pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
currently unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82157 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h
index 6480bf4..454a094 100644
--- a/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/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 @@
///
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const;
protected:
@@ -320,6 +322,7 @@
/// 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/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 4ee8d8c..626523b 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -121,6 +121,7 @@
// 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/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index fd8fd90..c1aab99 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -290,6 +290,7 @@
///
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 @@
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/lib/Target/X86/X86TargetObjectFile.cpp b/lib/Target/X86/X86TargetObjectFile.cpp
index ce0b8bf..4b4cc45 100644
--- a/lib/Target/X86/X86TargetObjectFile.cpp
+++ b/lib/Target/X86/X86TargetObjectFile.cpp
@@ -15,6 +15,7 @@
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/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h
index 24577ae..bee32a5 100644
--- a/lib/Target/X86/X86TargetObjectFile.h
+++ b/lib/Target/X86/X86TargetObjectFile.h
@@ -21,6 +21,7 @@
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const;
};
} // end namespace llvm