mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01:00
Minor DVarValue refactoring.
This commit is contained in:
@@ -43,15 +43,14 @@ LLValue* DVarValue::getLVal()
|
||||
LLValue* DVarValue::getRVal()
|
||||
{
|
||||
assert(val);
|
||||
Type* bt = type->toBasetype();
|
||||
|
||||
LLValue* tmp = val;
|
||||
llvm::Value* storage = val;
|
||||
if (var && isSpecialRefVar(var))
|
||||
tmp = DtoLoad(tmp);
|
||||
storage = DtoLoad(storage);
|
||||
|
||||
if (DtoIsPassedByRef(bt))
|
||||
return tmp;
|
||||
return DtoLoad(tmp);
|
||||
if (DtoIsPassedByRef(type->toBasetype()))
|
||||
return storage;
|
||||
return DtoLoad(storage);
|
||||
}
|
||||
|
||||
LLValue* DVarValue::getRefStorage()
|
||||
|
||||
Reference in New Issue
Block a user