# HG changeset patch # User lindquist # Date 1216127816 -7200 # Node ID d1574e142e93eca54b2e71b97bc26f915268da6f # Parent 83ade4f4025a887a52840d4787907202c6105f0c [svn r394] Fixed the new DtoNullValue function diff -r 83ade4f4025a -r d1574e142e93 gen/llvmhelpers.cpp --- 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)); }