[llvm-commits] CVS: llvm/include/llvm/Target/TargetJITInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Nov 19 19:43:41 PST 2004
Changes in directory llvm/include/llvm/Target:
TargetJITInfo.h updated: 1.2 -> 1.3
---
Log message:
Allow targets to implement relocation support.
---
Diffs of the changes: (+11 -0)
Index: llvm/include/llvm/Target/TargetJITInfo.h
diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.2 llvm/include/llvm/Target/TargetJITInfo.h:1.3
--- llvm/include/llvm/Target/TargetJITInfo.h:1.2 Mon Sep 27 20:59:17 2004
+++ llvm/include/llvm/Target/TargetJITInfo.h Fri Nov 19 21:43:27 2004
@@ -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 @@
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
More information about the llvm-commits
mailing list