Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function

the stub will resolve.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nicolas Geoffray
2008-04-16 20:46:05 +00:00
parent e20bbc8101
commit 51cc3c13ea
15 changed files with 78 additions and 51 deletions

View File

@@ -23,6 +23,7 @@
namespace llvm {
class Function;
class GlobalValue;
class MachineBasicBlock;
class MachineCodeEmitter;
class MachineRelocation;
@@ -41,8 +42,9 @@ namespace llvm {
virtual void replaceMachineCodeForFunction(void *Old, void *New) = 0;
/// emitGlobalValueLazyPtr - Use the specified MachineCodeEmitter object to
/// emit a lazy pointer which contains the address of the specified GV.
virtual void *emitGlobalValueLazyPtr(void *GV, MachineCodeEmitter &MCE) {
/// emit a lazy pointer which contains the address of the specified ptr.
virtual void *emitGlobalValueLazyPtr(const GlobalValue* GV, void *ptr,
MachineCodeEmitter &MCE) {
assert(0 && "This target doesn't implement emitGlobalValueLazyPtr!");
return 0;
}
@@ -50,7 +52,8 @@ namespace llvm {
/// emitFunctionStub - Use the specified MachineCodeEmitter object to emit a
/// small native function that simply calls the function at the specified
/// address. Return the address of the resultant function.
virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) {
virtual void *emitFunctionStub(const Function* F, void *Fn,
MachineCodeEmitter &MCE) {
assert(0 && "This target doesn't implement emitFunctionStub!");
return 0;
}