diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-15 23:53:25 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-15 23:53:25 +0000 |
commit | 50dead06ffc107edb7e84857baaeeb09039c631c (patch) | |
tree | 2e30bfd47153b472b2e2ff73a2fb3b594ca56f46 /lib/Transforms/Utils/CodeExtractor.cpp | |
parent | 6d823cd39d8d16571682cd1bb4cbf2ecb4815d8e (diff) |
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
Diffstat (limited to 'lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r-- | lib/Transforms/Utils/CodeExtractor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 46e27c8c27..be02560de0 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -372,8 +372,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer, StructValues.push_back(*i); } else { AllocaInst *alloca = - new AllocaInst(*codeReplacer->getContext(), - (*i)->getType(), 0, (*i)->getName()+".loc", + new AllocaInst((*i)->getType(), 0, (*i)->getName()+".loc", codeReplacer->getParent()->begin()->begin()); ReloadOutputs.push_back(alloca); params.push_back(alloca); @@ -390,7 +389,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer, // Allocate a struct at the beginning of this function Type *StructArgTy = Context->getStructType(ArgTypes); Struct = - new AllocaInst(*codeReplacer->getContext(), StructArgTy, 0, "structArg", + new AllocaInst(StructArgTy, 0, "structArg", codeReplacer->getParent()->begin()->begin()); params.push_back(Struct); |