diff gen/arrays.cpp @ 364:8014dbd24605 trunk

[svn r385] Fix lvalue cast problems with -= and friends. Fix complex DtoBoolean.
author ChristianK
date Mon, 14 Jul 2008 22:48:03 +0200
parents 9c9544fd769d
children bfb9d28f045a
line wrap: on
line diff
--- a/gen/arrays.cpp	Mon Jul 14 21:49:54 2008 +0200
+++ b/gen/arrays.cpp	Mon Jul 14 22:48:03 2008 +0200
@@ -757,7 +757,8 @@
 //////////////////////////////////////////////////////////////////////////////////////////
 LLValue* DtoArrayEquals(TOK op, DValue* l, DValue* r)
 {
-    LLValue* res = DtoBoolean(DtoArrayEqCmp_impl("_adEq", l, r, true));
+    LLValue* res = DtoArrayEqCmp_impl("_adEq", l, r, true);
+    res = new llvm::ICmpInst(llvm::ICmpInst::ICMP_NE, res, DtoConstInt(0), "tmp", gIR->scopebb());
     if (op == TOKnotequal)
         res = gIR->ir->CreateNot(res, "tmp");