Mercurial > projects > ldc
diff gen/llvmhelpers.cpp @ 373:d1574e142e93 trunk
[svn r394] Fixed the new DtoNullValue function
author | lindquist |
---|---|
date | Tue, 15 Jul 2008 15:16:56 +0200 |
parents | 83ade4f4025a |
children | 0e6b4d65d3f8 |
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp Tue Jul 15 14:53:16 2008 +0200 +++ b/gen/llvmhelpers.cpp Tue Jul 15 15:16:56 2008 +0200 @@ -653,13 +653,13 @@ // dynamic array else if (basety == Tarray) { - //TODO: What types do the constants here need to have? - return new DSliceValue(type, NULL, NULL); + LLValue* len = DtoConstSize_t(0); + LLValue* ptr = getNullPtr(getPtrToType(DtoType(basetype->next))); + return new DSliceValue(type, len, ptr); } // delegate else if (basety == Tdelegate) { - //TODO: Is this correct? return new DNullValue(type, LLConstant::getNullValue(lltype)); }