[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineCodeEmitter.h

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 19 19:44:36 PST 2004



Changes in directory llvm/include/llvm/CodeGen:

MachineCodeEmitter.h updated: 1.21 -> 1.22
---
Log message:

Add getCurrentPCOffset() and addRelocation() methods.


---
Diffs of the changes:  (+14 -5)

Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h
diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.21 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.22
--- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.21	Fri Nov 19 20:17:03 2004
+++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h	Fri Nov 19 21:44:24 2004
@@ -75,6 +75,20 @@
   ///
   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 @@
   //
   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.
   //






More information about the llvm-commits mailing list