Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index 305897c..ce7b04a 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -103,8 +103,6 @@
bool Changed = false;
assert(MallocFunc && FreeFunc && "Pass not initialized!");
- LLVMContext &Context = BB.getContext();
-
BasicBlock::InstListType &BBIL = BB.getInstList();
const TargetData &TD = getAnalysis<TargetData>();
@@ -156,7 +154,7 @@
if (MCall->getType() != Type::VoidTy)
MCast = new BitCastInst(MCall, MI->getType(), "", I);
else
- MCast = Context.getNullValue(MI->getType());
+ MCast = Constant::getNullValue(MI->getType());
// Replace all uses of the old malloc inst with the cast inst
MI->replaceAllUsesWith(MCast);