Add support for direct global references
authorChris Lattner <sabre@nondot.org>
Wed, 4 Dec 2002 06:44:27 +0000 (06:44 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Dec 2002 06:44:27 +0000 (06:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4905 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineCodeEmitter.h

index f0e5e3f2cb275b56dc205681a48294ac99f46609..6f47726de4699475445bf737204edc66ab6e6182 100644 (file)
@@ -13,6 +13,7 @@
 class MachineFunction;
 class MachineBasicBlock;
 class Value;
+class GlobalValue;
 
 struct MachineCodeEmitter {
   virtual ~MachineCodeEmitter() {}
@@ -43,6 +44,12 @@ struct MachineCodeEmitter {
   ///
   virtual void emitPCRelativeDisp(Value *V) {}
 
+  /// emitGlobalAddress - This callback is invoked when we need to write out the
+  /// address of a global value to machine code.  This is important for indirect
+  /// calls as well as accessing global variables.
+  ///
+  virtual void emitGlobalAddress(GlobalValue *V) {}
+
 
   /// createDebugMachineCodeEmitter - Return a dynamically allocated machine
   /// code emitter, which just prints the opcodes and fields out the cout.  This