aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGCXXTemp.cpp6
-rw-r--r--lib/CodeGen/CGExprScalar.cpp6
-rw-r--r--lib/CodeGen/CGObjCMac.cpp8
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/CGCXXTemp.cpp b/lib/CodeGen/CGCXXTemp.cpp
index b96f04dbe7..c7ac4150b4 100644
--- a/lib/CodeGen/CGCXXTemp.cpp
+++ b/lib/CodeGen/CGCXXTemp.cpp
@@ -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);
}
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index dd163a988e..baf007991c 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -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();
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index f759e4a93e..45a4bcef20 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -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);
}