From a6ebba270d1309e7c3d9fbdf58d8ac018138201f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 17 Sep 2009 18:49:52 +0000 Subject: [PATCH] pass machinemoduleinfo down into getSymbolForDwarfGlobalReference, currently unused. llvm-svn: 82157 --- llvm/include/llvm/Target/TargetLoweringObjectFile.h | 7 +++++-- llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 1 + llvm/lib/Target/TargetLoweringObjectFile.cpp | 2 ++ llvm/lib/Target/X86/X86TargetObjectFile.cpp | 1 + llvm/lib/Target/X86/X86TargetObjectFile.h | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h index 6480bf46a578..454a0940b974 100644 --- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -18,15 +18,16 @@ #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; }; diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index 4ee8d8c6d58c..626523b820f6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -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); } diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index fd8fd9006e3d..c1aab9921fb2 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -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; diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp index ce0b8bfba77f..4b4cc457aed0 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp +++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp @@ -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 diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.h b/llvm/lib/Target/X86/X86TargetObjectFile.h index 24577ae1bdaf..bee32a573903 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.h +++ b/llvm/lib/Target/X86/X86TargetObjectFile.h @@ -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