mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Destroy MachineFunction for any Function that we are about to
recompile and relink. This keeps it from failing an assertion when it goes and tries to construct a new MachineFunction for that Function. llvm-svn: 9459
This commit is contained in:
parent
a602a961a4
commit
a039f6bb07
@ -15,6 +15,7 @@
|
||||
#include "VM.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/ModuleProvider.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineCodeEmitter.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
@ -91,6 +92,7 @@ void *VM::recompileAndRelinkFunction(Function *F) {
|
||||
|
||||
void *OldAddr = Addr;
|
||||
Addr = 0;
|
||||
MachineFunction::destruct (F);
|
||||
runJITOnFunction (F);
|
||||
assert(Addr && "Code generation didn't add function to GlobalAddress table!");
|
||||
TM.replaceMachineCodeForFunction (OldAddr, Addr);
|
||||
|
Loading…
Reference in New Issue
Block a user