[cfe-commits] r76599 - in /cfe/trunk/lib/CodeGen: CGCXXTemp.cpp CGExprScalar.cpp CGObjCMac.cpp
Owen Anderson
resistor at mac.com
Tue Jul 21 11:06:44 PDT 2009
Author: resistor
Date: Tue Jul 21 13:06:41 2009
New Revision: 76599
URL: http://llvm.org/viewvc/llvm-project?rev=76599&view=rev
Log:
Update for LLVM API change.
Modified:
cfe/trunk/lib/CodeGen/CGCXXTemp.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXXTemp.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXXTemp.cpp?rev=76599&r1=76598&r2=76599&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXXTemp.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXXTemp.cpp Tue Jul 21 13:06:41 2009
@@ -29,12 +29,12 @@
// 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 @@
if (CondEnd) {
// Reset the condition. to false.
- Builder.CreateStore(VMContext.getConstantIntFalse(), Info.CondPtr);
+ Builder.CreateStore(VMContext.getFalse(), Info.CondPtr);
EmitBlock(CondEnd);
}
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=76599&r1=76598&r2=76599&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Tue Jul 21 13:06:41 2009
@@ -723,7 +723,7 @@
// 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 @@
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 @@
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();
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=76599&r1=76598&r2=76599&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Tue Jul 21 13:06:41 2009
@@ -2476,7 +2476,7 @@
"_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 @@
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 @@
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);
}
More information about the cfe-commits
mailing list