summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index d2a53138cbc..b6eb45d6534 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -865,7 +865,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
GlobalVariable *InitBool =
new GlobalVariable(Context, Type::Int1Ty, false,
GlobalValue::InternalLinkage,
- Context.getFalse(), GV->getName()+".init",
+ ConstantInt::getFalse(Context), GV->getName()+".init",
GV->isThreadLocal());
bool InitBoolUsed = false;
@@ -886,7 +886,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
default: llvm_unreachable("Unknown ICmp Predicate!");
case ICmpInst::ICMP_ULT:
case ICmpInst::ICMP_SLT:
- LV = Context.getFalse(); // X < null -> always false
+ LV = ConstantInt::getFalse(Context); // X < null -> always false
break;
case ICmpInst::ICMP_ULE:
case ICmpInst::ICMP_SLE:
@@ -908,7 +908,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
} else {
StoreInst *SI = cast<StoreInst>(GV->use_back());
// The global is initialized when the store to it occurs.
- new StoreInst(Context.getTrue(), InitBool, SI);
+ new StoreInst(ConstantInt::getTrue(Context), InitBool, SI);
SI->eraseFromParent();
}
@@ -1583,7 +1583,7 @@ static bool TryToShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal,
// Create the new global, initializing it to false.
GlobalVariable *NewGV = new GlobalVariable(Context, Type::Int1Ty, false,
- GlobalValue::InternalLinkage, Context.getFalse(),
+ GlobalValue::InternalLinkage, ConstantInt::getFalse(Context),
GV->getName()+".b",
GV->isThreadLocal());
GV->getParent()->getGlobalList().insert(GV, NewGV);
OpenPOWER on IntegriCloud