Update for LLVM API change.

llvm-svn: 77686
This commit is contained in:
Owen Anderson 2009-07-31 17:39:36 +00:00
parent 23a204d91b
commit fe4e34707c
3 changed files with 10 additions and 10 deletions

View 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.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 @@ void CodeGenFunction::PopCXXTemporary() {
if (CondEnd) {
// Reset the condition. to false.
Builder.CreateStore(VMContext.getFalse(), Info.CondPtr);
Builder.CreateStore(llvm::ConstantInt::getFalse(VMContext), Info.CondPtr);
EmitBlock(CondEnd);
}

View File

@ -729,7 +729,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.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 @@ 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.getFalse(), *PI);
PN->addIncoming(llvm::ConstantInt::getFalse(VMContext), *PI);
CGF.PushConditionalTempDestruction();
CGF.EmitBlock(RHSBlock);
@ -1374,7 +1374,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.getTrue(), *PI);
PN->addIncoming(llvm::ConstantInt::getTrue(VMContext), *PI);
CGF.PushConditionalTempDestruction();

View File

@ -2472,7 +2472,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
"_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 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
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 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
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);
}