# HG changeset patch # User Tomas Lindquist Olsen # Date 1221484661 -7200 # Node ID 03a5e609eef3f9f4cfa63533f66413dda04ac30a # Parent 311f16f262974fc895c79ab67589147d24e92985 Fixed DLRValue::getLType did not handle the lvalue being a LRValue itself properly. diff -r 311f16f26297 -r 03a5e609eef3 gen/dvalue.cpp --- a/gen/dvalue.cpp Mon Sep 15 02:39:55 2008 +0200 +++ b/gen/dvalue.cpp Mon Sep 15 15:17:41 2008 +0200 @@ -68,3 +68,15 @@ ///////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////// + +Type*& DLRValue::getLType() +{ + if (DLRValue* lr = lvalue->isLRValue()) + { + return lr->getLType(); + } + else + { + return lvalue->getType(); + } +} diff -r 311f16f26297 -r 03a5e609eef3 gen/dvalue.h --- a/gen/dvalue.h Mon Sep 15 02:39:55 2008 +0200 +++ b/gen/dvalue.h Mon Sep 15 15:17:41 2008 +0200 @@ -162,7 +162,7 @@ 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; }