mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-31 10:34:17 +00:00
Make JIT::runFunction clean up the generated stub function.
Patch by Shivram K! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
835acabce1
commit
3174f6703e
@ -553,8 +553,12 @@ GenericValue JIT::runFunction(Function *F,
|
||||
else
|
||||
ReturnInst::Create(F->getContext(), StubBB); // Just return void.
|
||||
|
||||
// Finally, return the value returned by our nullary stub function.
|
||||
return runFunction(Stub, std::vector<GenericValue>());
|
||||
// Finally, call our nullary stub function.
|
||||
GenericValue Result = runFunction(Stub, std::vector<GenericValue>());
|
||||
// Erase it, since no other function can have a reference to it.
|
||||
Stub->eraseFromParent();
|
||||
// And return the result.
|
||||
return Result;
|
||||
}
|
||||
|
||||
void JIT::RegisterJITEventListener(JITEventListener *L) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user