mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +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
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue