diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
commit | 051a950000e21935165db56695e35bade668193b (patch) | |
tree | 76db4bc690c153a1cfbd2989849c3b1d95500390 /lib/ExecutionEngine/JIT/JIT.cpp | |
parent | d963ab1f58adb6daa028533ff3285841d7e45f80 (diff) |
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index f92842abdc..776129e6b2 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -220,11 +220,11 @@ GenericValue JIT::runFunction(Function *F, // First, create the function. FunctionType *STy=FunctionType::get(RetTy, std::vector<const Type*>(), false); - Function *Stub = new Function(STy, Function::InternalLinkage, "", - F->getParent()); + Function *Stub = Function::Create(STy, Function::InternalLinkage, "", + F->getParent()); // Insert a basic block. - BasicBlock *StubBB = new BasicBlock("", Stub); + BasicBlock *StubBB = BasicBlock::Create("", Stub); // Convert all of the GenericValue arguments over to constants. Note that we // currently don't support varargs. @@ -257,12 +257,12 @@ GenericValue JIT::runFunction(Function *F, Args.push_back(C); } - CallInst *TheCall = new CallInst(F, Args.begin(), Args.end(), "", StubBB); + CallInst *TheCall = CallInst::Create(F, Args.begin(), Args.end(), "", StubBB); TheCall->setTailCall(); if (TheCall->getType() != Type::VoidTy) - new ReturnInst(TheCall, StubBB); // Return result of the call. + ReturnInst::Create(TheCall, StubBB); // Return result of the call. else - new ReturnInst(StubBB); // Just return void. + ReturnInst::Create(StubBB); // Just return void. // Finally, return the value returned by our nullary stub function. return runFunction(Stub, std::vector<GenericValue>()); |