pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
authorChris Lattner <sabre@nondot.org>
Thu, 17 Sep 2009 18:49:52 +0000 (18:49 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 17 Sep 2009 18:49:52 +0000 (18:49 +0000)
currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82157 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLoweringObjectFile.h
lib/CodeGen/AsmPrinter/DwarfException.cpp
lib/Target/TargetLoweringObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.cpp
lib/Target/X86/X86TargetObjectFile.h

index 6480bf46a5783c6336fabdc3cfd363280ebf2031..454a0940b97420cd3332c66049931f25d3f3951a 100644 (file)
 #include "llvm/MC/SectionKind.h"
 
 namespace llvm {
+  class MachineModuleInfo;
   class Mangler;
+  class MCAsmInfo;
+  class MCExpr;
   class MCSection;
   class MCSectionMachO;
   class MCContext;
   class GlobalValue;
   class StringRef;
   class TargetMachine;
-  class MCAsmInfo;
-  class MCExpr;
   
 class TargetLoweringObjectFile {
   MCContext *Ctx;
@@ -188,6 +189,7 @@ public:
   ///
   virtual const MCExpr *
   getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                   MachineModuleInfo *MMI,
                                    bool &IsIndirect, bool &IsPCRel) const;
   
 protected:
@@ -320,6 +322,7 @@ public:
   /// defaults to returning a stub reference.
   virtual const MCExpr *
   getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                   MachineModuleInfo *MMI,
                                    bool &IsIndirect, bool &IsPCRel) const;
 };
 
index 4ee8d8c6d58cb6d104a11664587809641294b90b..626523b820f63c2f9adc48c310c96d995d90227f 100644 (file)
@@ -121,6 +121,7 @@ void DwarfException::EmitCIE(const Function *PersonalityFn, unsigned Index) {
     // In non-static mode, ask the object file how to represent this reference.
     PersonalityRef =
       TLOF.getSymbolForDwarfGlobalReference(PersonalityFn, Asm->Mang,
+                                            Asm->MMI,
                                             IsPersonalityIndirect,
                                             IsPersonalityPCRel);
   }
index fd8fd9006e3d420d60b92a94888b0d318ba13815..c1aab9921fb22a5b468cb33bfe4715da46c6a0a8 100644 (file)
@@ -290,6 +290,7 @@ TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const {
 ///
 const MCExpr *TargetLoweringObjectFile::
 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                 MachineModuleInfo *MMI,
                                  bool &IsIndirect, bool &IsPCRel) const {
   // The generic implementation of this just returns a direct reference to the
   // symbol.
@@ -956,6 +957,7 @@ shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const {
 
 const MCExpr *TargetLoweringObjectFileMachO::
 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                 MachineModuleInfo *MMI,
                                  bool &IsIndirect, bool &IsPCRel) const {
   // The mach-o version of this method defaults to returning a stub reference.
   IsIndirect = true;
index ce0b8bfba77f386623b8842d9e10e60da5f429fe..4b4cc457aed05c4f331272933a90aaed49a6e0b1 100644 (file)
@@ -15,6 +15,7 @@ using namespace llvm;
 
 const MCExpr *X8664_MachoTargetObjectFile::
 getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                 MachineModuleInfo *MMI,
                                  bool &IsIndirect, bool &IsPCRel) const {
   
   // On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which
index 24577ae1bdaf7252b3a78a7bb5c289d055783788..bee32a573903939c023b59a8fe340db8a36acbc1 100644 (file)
@@ -21,6 +21,7 @@ namespace llvm {
 
     virtual const MCExpr *
     getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+                                     MachineModuleInfo *MMI,
                                      bool &IsIndirect, bool &IsPCRel) const;
   };
 } // end namespace llvm