diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/ShadowStackGC.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/UnreachableBlockElim.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index 113eea0777..67e4e6f762 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -346,7 +346,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { } case Intrinsic::sigsetjmp: if (CI->getType() != Type::VoidTy) - CI->replaceAllUsesWith(Context.getNullValue(CI->getType())); + CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); break; case Intrinsic::longjmp: { @@ -393,7 +393,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { "save" : "restore") << " intrinsic.\n"; Warned = true; if (Callee->getIntrinsicID() == Intrinsic::stacksave) - CI->replaceAllUsesWith(Context.getNullValue(CI->getType())); + CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); break; } @@ -428,7 +428,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { case Intrinsic::eh_exception: case Intrinsic::eh_selector_i32: case Intrinsic::eh_selector_i64: - CI->replaceAllUsesWith(Context.getNullValue(CI->getType())); + CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); break; case Intrinsic::eh_typeid_for_i32: diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 01493bbba7..1b38fca93d 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -92,7 +92,7 @@ unsigned FastISel::getRegForValue(Value *V) { } else if (isa<ConstantPointerNull>(V)) { // Translate this as an integer zero so that it can be // local-CSE'd with actual integer zeros. - Reg = getRegForValue(V->getContext().getNullValue(TD.getIntPtrType())); + Reg = getRegForValue(Constant::getNullValue(TD.getIntPtrType())); } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) { Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF); @@ -481,7 +481,7 @@ bool FastISel::SelectCall(User *I) { UpdateValueMap(I, ResultReg); } else { unsigned ResultReg = - getRegForValue(I->getContext().getNullValue(I->getType())); + getRegForValue(Constant::getNullValue(I->getType())); UpdateValueMap(I, ResultReg); } return true; diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp index b412532e33..3aa86d04f8 100644 --- a/lib/CodeGen/ShadowStackGC.cpp +++ b/lib/CodeGen/ShadowStackGC.cpp @@ -294,10 +294,10 @@ bool ShadowStackGC::initializeCustomLowering(Module &M) { // linkage! Head = new GlobalVariable(M, StackEntryPtrTy, false, GlobalValue::LinkOnceAnyLinkage, - M.getContext().getNullValue(StackEntryPtrTy), + Constant::getNullValue(StackEntryPtrTy), "llvm_gc_root_chain"); } else if (Head->hasExternalLinkage() && Head->isDeclaration()) { - Head->setInitializer(M.getContext().getNullValue(StackEntryPtrTy)); + Head->setInitializer(Constant::getNullValue(StackEntryPtrTy)); Head->setLinkage(GlobalValue::LinkOnceAnyLinkage); } diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index 27b9627e59..c3b213cebe 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -68,7 +68,7 @@ bool UnreachableBlockElim::runOnFunction(Function &F) { BasicBlock *BB = I; DeadBlocks.push_back(BB); while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) { - PN->replaceAllUsesWith(F.getContext().getNullValue(PN->getType())); + PN->replaceAllUsesWith(Constant::getNullValue(PN->getType())); BB->getInstList().pop_front(); } for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI) |