[cfe-commits] r77686 - in /cfe/trunk/lib/CodeGen: CGCXXTemp.cpp CGExprScalar.cpp CGObjCMac.cpp
Owen Anderson
resistor at mac.com
Fri Jul 31 10:39:36 PDT 2009
Author: resistor
Date: Fri Jul 31 12:39:36 2009
New Revision: 77686
URL: http://llvm.org/viewvc/llvm-project?rev=77686&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=77686&r1=77685&r2=77686&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXXTemp.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXXTemp.cpp Fri Jul 31 12:39:36 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.getFalse(), CondPtr);
+ new llvm::StoreInst(llvm::ConstantInt::getFalse(VMContext), CondPtr);
llvm::BasicBlock *Block = AllocaInsertPt->getParent();
Block->getInstList().insertAfter((llvm::Instruction *)AllocaInsertPt, SI);
// Now set it to true.
- Builder.CreateStore(VMContext.getTrue(), CondPtr);
+ Builder.CreateStore(llvm::ConstantInt::getTrue(VMContext), CondPtr);
}
LiveTemporaries.push_back(CXXLiveTemporaryInfo(Temporary, Ptr, DtorBlock,
@@ -74,7 +74,7 @@
if (CondEnd) {
// Reset the condition. to false.
- Builder.CreateStore(VMContext.getFalse(), Info.CondPtr);
+ Builder.CreateStore(llvm::ConstantInt::getFalse(VMContext), 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=77686&r1=77685&r2=77686&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Fri Jul 31 12:39:36 2009
@@ -729,7 +729,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.getTrue();
+ NextVal = llvm::ConstantInt::getTrue(VMContext);
} else if (isa<llvm::IntegerType>(InVal->getType())) {
NextVal = llvm::ConstantInt::get(InVal->getType(), AmountVal);
NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
@@ -1327,7 +1327,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.getFalse(), *PI);
+ PN->addIncoming(llvm::ConstantInt::getFalse(VMContext), *PI);
CGF.PushConditionalTempDestruction();
CGF.EmitBlock(RHSBlock);
@@ -1374,7 +1374,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.getTrue(), *PI);
+ PN->addIncoming(llvm::ConstantInt::getTrue(VMContext), *PI);
CGF.PushConditionalTempDestruction();
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=77686&r1=77685&r2=77686&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Fri Jul 31 12:39:36 2009
@@ -2472,7 +2472,7 @@
"_rethrow");
llvm::Value *CallTryExitPtr = CGF.CreateTempAlloca(llvm::Type::Int1Ty,
"_call_try_exit");
- CGF.Builder.CreateStore(VMContext.getTrue(), CallTryExitPtr);
+ CGF.Builder.CreateStore(llvm::ConstantInt::getTrue(VMContext), CallTryExitPtr);
// Enter a new try block and call setjmp.
CGF.Builder.CreateCall(ObjCTypes.getExceptionTryEnterFn(), ExceptionData);
@@ -2505,7 +2505,7 @@
if (!isTry)
{
CGF.Builder.CreateStore(Caught, RethrowPtr);
- CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
+ CGF.Builder.CreateStore(llvm::ConstantInt::getFalse(VMContext), CallTryExitPtr);
CGF.EmitBranchThroughCleanup(FinallyRethrow);
} else if (const ObjCAtCatchStmt* CatchStmt =
cast<ObjCAtTryStmt>(S).getCatchStmts()) {
@@ -2604,11 +2604,11 @@
CGF.Builder.CreateCall(ObjCTypes.getExceptionExtractFn(),
ExceptionData),
RethrowPtr);
- CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
+ CGF.Builder.CreateStore(llvm::ConstantInt::getFalse(VMContext), CallTryExitPtr);
CGF.EmitBranchThroughCleanup(FinallyRethrow);
} else {
CGF.Builder.CreateStore(Caught, RethrowPtr);
- CGF.Builder.CreateStore(VMContext.getFalse(), CallTryExitPtr);
+ CGF.Builder.CreateStore(llvm::ConstantInt::getFalse(VMContext), CallTryExitPtr);
CGF.EmitBranchThroughCleanup(FinallyRethrow);
}
More information about the cfe-commits
mailing list