mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Allow targets to implement relocation support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6e7e3aadd
commit
9da3c56efd
@ -17,10 +17,13 @@
|
|||||||
#ifndef LLVM_TARGET_TARGETJITINFO_H
|
#ifndef LLVM_TARGET_TARGETJITINFO_H
|
||||||
#define LLVM_TARGET_TARGETJITINFO_H
|
#define LLVM_TARGET_TARGETJITINFO_H
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class Function;
|
class Function;
|
||||||
class FunctionPassManager;
|
class FunctionPassManager;
|
||||||
class MachineCodeEmitter;
|
class MachineCodeEmitter;
|
||||||
|
class MachineRelocation;
|
||||||
|
|
||||||
/// TargetJITInfo - Target specific information required by the Just-In-Time
|
/// TargetJITInfo - Target specific information required by the Just-In-Time
|
||||||
/// code generator.
|
/// code generator.
|
||||||
@ -49,6 +52,14 @@ namespace llvm {
|
|||||||
virtual void *getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) {
|
virtual void *getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// relocate - Before the JIT can run a block of code that has been emitted,
|
||||||
|
/// it must rewrite the code to contain the actual addresses of any
|
||||||
|
/// referenced global symbols.
|
||||||
|
virtual void relocate(void *Function, MachineRelocation *MR,
|
||||||
|
unsigned NumRelocs) {
|
||||||
|
assert(NumRelocs == 0 && "This target does not have relocations!");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user