mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00
[svn r394] Fixed the new DtoNullValue function
This commit is contained in:
parent
625f28814d
commit
d583262c98
1 changed files with 3 additions and 3 deletions
|
@ -653,13 +653,13 @@ DValue* DtoNullValue(Type* type)
|
||||||
// dynamic array
|
// dynamic array
|
||||||
else if (basety == Tarray)
|
else if (basety == Tarray)
|
||||||
{
|
{
|
||||||
//TODO: What types do the constants here need to have?
|
LLValue* len = DtoConstSize_t(0);
|
||||||
return new DSliceValue(type, NULL, NULL);
|
LLValue* ptr = getNullPtr(getPtrToType(DtoType(basetype->next)));
|
||||||
|
return new DSliceValue(type, len, ptr);
|
||||||
}
|
}
|
||||||
// delegate
|
// delegate
|
||||||
else if (basety == Tdelegate)
|
else if (basety == Tdelegate)
|
||||||
{
|
{
|
||||||
//TODO: Is this correct?
|
|
||||||
return new DNullValue(type, LLConstant::getNullValue(lltype));
|
return new DNullValue(type, LLConstant::getNullValue(lltype));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue