summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineCodeEmitter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-20 03:44:39 +0000
committerChris Lattner <sabre@nondot.org>2004-11-20 03:44:39 +0000
commit47012c0c711fd10901fb30643def557af7bbb4a9 (patch)
tree844c9eaf7fc2dc552426dc59955e8d9fc19fd71d /include/llvm/CodeGen/MachineCodeEmitter.h
parentfab11a711021768cd3cf30f699bf4adf26fdaccf (diff)
downloadllvm-47012c0c711fd10901fb30643def557af7bbb4a9.tar.gz
llvm-47012c0c711fd10901fb30643def557af7bbb4a9.tar.bz2
llvm-47012c0c711fd10901fb30643def557af7bbb4a9.tar.xz
Add getCurrentPCOffset() and addRelocation() methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineCodeEmitter.h')
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 8b61c7c5d0..5bc1d1e266 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -75,6 +75,20 @@ public:
///
virtual void emitWord(unsigned W) = 0;
+ /// getCurrentPCValue - This returns the address that the next emitted byte
+ /// will be output to.
+ ///
+ virtual uint64_t getCurrentPCValue() = 0;
+
+
+ /// getCurrentPCOffset - Return the offset from the start of the emitted
+ /// buffer that we are currently writing to.
+ virtual uint64_t getCurrentPCOffset() = 0;
+
+ /// addRelocation - Whenever a relocatable address is needed, it should be
+ /// noted with this interface.
+ virtual void addRelocation(const MachineRelocation &MR) = 0;
+
/// getGlobalValueAddress - This method is used to get the address of the
/// specified global value. In some cases, however, the address may not yet
/// be known at the point that the method is called (for example, getting the
@@ -90,11 +104,6 @@ public:
//
virtual uint64_t getConstantPoolEntryAddress(unsigned Index) = 0;
- // getCurrentPCValue - This returns the address that the next emitted byte
- // will be output to.
- //
- virtual uint64_t getCurrentPCValue() = 0;
-
// forceCompilationOf - Force the compilation of the specified function, and
// return its address, because we REALLY need the address now.
//