mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Fixed DLRValue::getLType did not handle the lvalue being a LRValue itself properly.
This commit is contained in:
@@ -68,3 +68,15 @@ LLValue* DConstValue::getRVal()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Type*& DLRValue::getLType()
|
||||
{
|
||||
if (DLRValue* lr = lvalue->isLRValue())
|
||||
{
|
||||
return lr->getLType();
|
||||
}
|
||||
else
|
||||
{
|
||||
return lvalue->getType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ struct DLRValue : DValue
|
||||
virtual LLValue* getLVal() { return lvalue->isLVal() ? lvalue->getLVal() : lvalue->getRVal(); }
|
||||
virtual LLValue* getRVal() { return rvalue->getRVal(); }
|
||||
|
||||
Type*& getLType() { return lvalue->getType(); }
|
||||
Type*& getLType();
|
||||
Type*& getRType() { return rvalue->getType(); }
|
||||
virtual Type*& getType() { return getRType(); }
|
||||
virtual DLRValue* isLRValue() { return this; }
|
||||
|
||||
Reference in New Issue
Block a user