diff gen/complex.cpp @ 1529:ad7f2f1862d6

Adjust LDC to work with the LLVMContext LLVM changes. This means we now require a fairly new LLVM revision. I use 75234.
author Christian Kamm <kamm incasoftware de>
date Fri, 10 Jul 2009 21:30:02 +0200
parents cc5fee7836dc
children 8ca25bd765a3
line wrap: on
line diff
--- a/gen/complex.cpp	Thu Jul 09 21:13:19 2009 +0100
+++ b/gen/complex.cpp	Fri Jul 10 21:30:02 2009 +0200
@@ -396,8 +396,8 @@
         cmpop = llvm::FCmpInst::FCMP_UNE;
 
     // (l.re==r.re && l.im==r.im) or (l.re!=r.re || l.im!=r.im)
-    LLValue* b1 = new llvm::FCmpInst(cmpop, lhs_re, rhs_re, "tmp", gIR->scopebb());
-    LLValue* b2 = new llvm::FCmpInst(cmpop, lhs_im, rhs_im, "tmp", gIR->scopebb());
+    LLValue* b1 = gIR->ir->CreateFCmp(cmpop, lhs_re, rhs_re, "tmp");
+    LLValue* b2 = gIR->ir->CreateFCmp(cmpop, lhs_im, rhs_im, "tmp");
 
     if (op == TOKequal)
         return gIR->ir->CreateAnd(b1,b2,"tmp");