Mercurial > projects > ldc
diff gen/dvalue.cpp @ 601:03a5e609eef3
Fixed DLRValue::getLType did not handle the lvalue being a LRValue itself properly.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 15 Sep 2008 15:17:41 +0200 |
parents | fbb1a366cfbc |
children | 30b42a283c8e |
line wrap: on
line diff
--- 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(); + } +}