diff gen/toir.cpp @ 1548:a326f145a57b

ConstantInt::get{True,False} moved to LLVMContext Non-breaking build fix for LLVM r76533. Also fixes a context related bug in GarbageCollect2Stack.
author Benjamin Kramer <benny.kra@gmail.com>
date Tue, 21 Jul 2009 13:11:39 +0200
parents 7fcb72d518f6
children d6e8d5db259f
line wrap: on
line diff
--- a/gen/toir.cpp	Mon Jul 20 18:16:11 2009 +0200
+++ b/gen/toir.cpp	Tue Jul 21 13:11:39 2009 +0200
@@ -1356,11 +1356,11 @@
             break;
         case TOKleg:
             skip = true;
-            eval = llvm::ConstantInt::getTrue();
+            eval = gIR->context().getConstantIntTrue();
             break;
         case TOKunord:
             skip = true;
-            eval = llvm::ConstantInt::getFalse();
+            eval = gIR->context().getConstantIntFalse();
             break;
 
         default:
@@ -1844,7 +1844,7 @@
         llvm::PHINode* phi = p->ir->CreatePHI(LLType::Int1Ty, "andandval");
         // If we jumped over evaluation of the right-hand side,
         // the result is false. Otherwise it's the value of the right-hand side.
-        phi->addIncoming(LLConstantInt::getFalse(), oldblock);
+        phi->addIncoming(gIR->context().getConstantIntFalse(), oldblock);
         phi->addIncoming(vbool, newblock);
         resval = phi;
     }
@@ -1891,7 +1891,7 @@
         llvm::PHINode* phi = p->ir->CreatePHI(LLType::Int1Ty, "ororval");
         // If we jumped over evaluation of the right-hand side,
         // the result is true. Otherwise, it's the value of the right-hand side.
-        phi->addIncoming(LLConstantInt::getTrue(), oldblock);
+        phi->addIncoming(gIR->context().getConstantIntTrue(), oldblock);
         phi->addIncoming(vbool, newblock);
         resval = phi;
     }