1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Allow targets to implement relocation support.

llvm-svn: 18032
This commit is contained in:
Chris Lattner 2004-11-20 03:43:27 +00:00
parent c72d2a96dc
commit bae6c00a15

View File

@ -17,10 +17,13 @@
#ifndef LLVM_TARGET_TARGETJITINFO_H
#define LLVM_TARGET_TARGETJITINFO_H
#include <cassert>
namespace llvm {
class Function;
class FunctionPassManager;
class MachineCodeEmitter;
class MachineRelocation;
/// TargetJITInfo - Target specific information required by the Just-In-Time
/// code generator.
@ -49,6 +52,14 @@ namespace llvm {
virtual void *getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) {
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