diff gen/complex.cpp @ 1151:3cf0066e6faf

- Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM. - Eliminated the DLRValue DValue. - Implemented proactive handling of l-value CastExpS. - Minor tweak in runtime memory.d .
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Sat, 28 Mar 2009 05:00:43 +0100
parents 4adf0f742896
children ae70c438b281
line wrap: on
line diff
--- a/gen/complex.cpp	Fri Mar 27 23:24:47 2009 +0100
+++ b/gen/complex.cpp	Sat Mar 28 05:00:43 2009 +0100
@@ -429,16 +429,7 @@
         }
 
         LLValue* pair = DtoAggrPair(DtoType(_to), re, im);
-        DValue* rval = new DImValue(_to, pair);
-
-        // if the value we're casting is not a lvalue, the cast value can't be either
-        if (!val->isLVal()) {
-            return rval;
-        }
-
-        // unfortunately at this point, the cast value can show up as the lvalue for += and similar expressions.
-        // so we need to maintain the storage
-        return new DLRValue(val, rval);
+        return new DImValue(_to, pair);
     }
     else if (to->isimaginary()) {
         // FIXME: this loads both values, even when we only need one