diff gen/toir.cpp @ 345:5320fe65a65d trunk

[svn r366] Fixed identity exprs for structs was comparing addresses, not content!
author lindquist
date Sun, 13 Jul 2008 04:27:02 +0200
parents e20ce6d8d374
children 6057fdf797d8
line wrap: on
line diff
--- a/gen/toir.cpp	Sun Jul 13 04:11:08 2008 +0200
+++ b/gen/toir.cpp	Sun Jul 13 04:27:02 2008 +0200
@@ -2260,7 +2260,11 @@
     // handle dynarray specially
     if (t1->ty == Tarray)
         return new DImValue(type, DtoDynArrayIs(op,u,v));
-
+    // also structs
+    else if (t1->ty == Tstruct)
+        return new DImValue(type, DtoStructEquals(op,u,v));
+
+    // FIXME this stuff isn't pretty
     LLValue* l = u->getRVal();
     LLValue* r = v->getRVal();
     LLValue* eval = 0;