mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-19 13:13:16 +01:00
[svn r394] Fixed the new DtoNullValue function
This commit is contained in:
@@ -653,13 +653,13 @@ DValue* DtoNullValue(Type* type)
|
||||
// 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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user