]> granicus.if.org Git - clang/commitdiff
Update for LLVM API change.
authorOwen Anderson <resistor@mac.com>
Tue, 21 Jul 2009 18:06:41 +0000 (18:06 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 21 Jul 2009 18:06:41 +0000 (18:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76599 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXXTemp.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGObjCMac.cpp

index f47af23f046b972141301818f0ad6a6fd20a6483..b96f04dbe72ce7d8b7b1a90163044715413614db 100644 (file)
@@ -29,12 +29,12 @@ void CodeGenFunction::PushCXXTemporary(const CXXTemporary *Temporary,
     // Initialize it to false. This initialization takes place right after
     // the alloca insert point.
     llvm::StoreInst *SI = 
-      new llvm::StoreInst(VMContext.getConstantIntFalse(), CondPtr);
+      new llvm::StoreInst(VMContext.getFalse(), CondPtr);
     llvm::BasicBlock *Block = AllocaInsertPt->getParent();
     Block->getInstList().insertAfter((llvm::Instruction *)AllocaInsertPt, SI);
 
     // Now set it to true.
-    Builder.CreateStore(VMContext.getConstantIntTrue(), CondPtr);
+    Builder.CreateStore(VMContext.getTrue(), CondPtr);
   }
   
   LiveTemporaries.push_back(CXXLiveTemporaryInfo(Temporary, Ptr, DtorBlock, 
@@ -74,7 +74,7 @@ void CodeGenFunction::PopCXXTemporary() {
 
   if (CondEnd) {
     // Reset the condition. to false.
-    Builder.CreateStore(VMContext.getConstantIntFalse(), Info.CondPtr);
+    Builder.CreateStore(VMContext.getFalse(), Info.CondPtr);
     EmitBlock(CondEnd);
   }
   
index c1b2da04c8bfbbce5a1dabd729b27f8928d27978..e58693a8d66cb76b566280c6d7a6ae7abf13fee6 100644 (file)
@@ -723,7 +723,7 @@ Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
     // Bool = ((int)Bool+1) != 0
     // An interesting aspect of this is that increment is always true.
     // Decrement does not have this property.
-    NextVal = VMContext.getConstantIntTrue();
+    NextVal = VMContext.getTrue();
   } else if (isa<llvm::IntegerType>(InVal->getType())) {
     NextVal = VMContext.getConstantInt(InVal->getType(), AmountVal);
     NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
@@ -1320,7 +1320,7 @@ Value *ScalarExprEmitter::VisitBinLAnd(const BinaryOperator *E) {
   PN->reserveOperandSpace(2);  // Normal case, two inputs.
   for (llvm::pred_iterator PI = pred_begin(ContBlock), PE = pred_end(ContBlock);
        PI != PE; ++PI)
-    PN->addIncoming(VMContext.getConstantIntFalse(), *PI);
+    PN->addIncoming(VMContext.getFalse(), *PI);
   
   CGF.PushConditionalTempDestruction();
   CGF.EmitBlock(RHSBlock);
@@ -1367,7 +1367,7 @@ Value *ScalarExprEmitter::VisitBinLOr(const BinaryOperator *E) {
   PN->reserveOperandSpace(2);  // Normal case, two inputs.
   for (llvm::pred_iterator PI = pred_begin(ContBlock), PE = pred_end(ContBlock);
        PI != PE; ++PI)
-    PN->addIncoming(VMContext.getConstantIntTrue(), *PI);
+    PN->addIncoming(VMContext.getTrue(), *PI);
 
   CGF.PushConditionalTempDestruction();
 
index 7252de6ec67099d2ea80568bbd6fc7cb4d0927b6..88b27eaf92dbb753899dfbe35b31820f7197780f 100644 (file)
@@ -2476,7 +2476,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
                                                  "_rethrow");
   llvm::Value *CallTryExitPtr = CGF.CreateTempAlloca(llvm::Type::Int1Ty,
                                                      "_call_try_exit");
-  CGF.Builder.CreateStore(VMContext.getConstantIntTrue(), CallTryExitPtr);
+  CGF.Builder.CreateStore(VMContext.getTrue(), CallTryExitPtr);
   
   // Enter a new try block and call setjmp.
   CGF.Builder.CreateCall(ObjCTypes.getExceptionTryEnterFn(), ExceptionData);
@@ -2509,7 +2509,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
   if (!isTry)
   {
     CGF.Builder.CreateStore(Caught, RethrowPtr);
-    CGF.Builder.CreateStore(VMContext.getConstantIntFalse(), CallTryExitPtr);
+    CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
     CGF.EmitBranchThroughCleanup(FinallyRethrow);
   }
   else if (const ObjCAtCatchStmt* CatchStmt = 
@@ -2610,11 +2610,11 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
                     CGF.Builder.CreateCall(ObjCTypes.getExceptionExtractFn(),
                                            ExceptionData), 
                             RethrowPtr);
-    CGF.Builder.CreateStore(VMContext.getConstantIntFalse(), CallTryExitPtr);
+    CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
     CGF.EmitBranchThroughCleanup(FinallyRethrow);
   } else {
     CGF.Builder.CreateStore(Caught, RethrowPtr);
-    CGF.Builder.CreateStore(VMContext.getConstantIntFalse(), CallTryExitPtr);
+    CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
     CGF.EmitBranchThroughCleanup(FinallyRethrow);
   }