Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75863 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index aa49b24..52dd06a 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -508,7 +508,7 @@
AllocaInst *AI = 0;
if (I.getType() != Type::VoidTy) {
- AI = new AllocaInst(*Context, I.getType(), 0, I.getName(),
+ AI = new AllocaInst(I.getType(), 0, I.getName(),
I.getParent()->getParent()->getEntryBlock().begin());
CurAST->add(AI);
}
@@ -853,8 +853,7 @@
continue;
const Type *Ty = cast<PointerType>(V->getType())->getElementType();
- AllocaInst *AI = new AllocaInst(*Context, Ty, 0,
- V->getName()+".tmp", FnStart);
+ AllocaInst *AI = new AllocaInst(Ty, 0, V->getName()+".tmp", FnStart);
PromotedValues.push_back(std::make_pair(AI, V));
// Update the AST and alias analysis.