summaryrefslogtreecommitdiff
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-02-08 14:53:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-02-08 14:53:28 +0000
commite09411dd68534824b0a79749da44589983061d07 (patch)
treea996d6eef6a81b20df25609fa11663230813640f /lib/Target/X86
parent3f2e9e5e79687c5589cef23cb93badabdec6736f (diff)
downloadllvm-e09411dd68534824b0a79749da44589983061d07.tar.gz
llvm-e09411dd68534824b0a79749da44589983061d07.tar.bz2
llvm-e09411dd68534824b0a79749da44589983061d07.tar.xz
Pass the Mangler by reference.
It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/X86TargetObjectFile.cpp12
-rw-r--r--lib/Target/X86/X86TargetObjectFile.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/Target/X86/X86TargetObjectFile.cpp b/lib/Target/X86/X86TargetObjectFile.cpp
index bc1064e17f..bf28495c80 100644
--- a/lib/Target/X86/X86TargetObjectFile.cpp
+++ b/lib/Target/X86/X86TargetObjectFile.cpp
@@ -19,14 +19,14 @@ using namespace llvm;
using namespace dwarf;
const MCExpr *X86_64MachoTargetObjectFile::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
// On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which
// is an indirect pc-relative reference.
if (Encoding & (DW_EH_PE_indirect | DW_EH_PE_pcrel)) {
- const MCSymbol *Sym = getSymbol(*Mang, GV);
+ const MCSymbol *Sym = getSymbol(Mang, GV);
const MCExpr *Res =
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext());
const MCExpr *Four = MCConstantExpr::Create(4, getContext());
@@ -38,9 +38,9 @@ getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
}
MCSymbol *X86_64MachoTargetObjectFile::
-getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const {
- return getSymbol(*Mang, GV);
+ return getSymbol(Mang, GV);
}
void
@@ -57,7 +57,7 @@ X86LinuxTargetObjectFile::getDebugThreadLocalSymbol(
const MCExpr *
X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE,
- Mangler *Mang) const {
+ Mangler &Mang) const {
// We are looking for the difference of two symbols, need a subtraction
// operation.
const SubOperator *Sub = dyn_cast<SubOperator>(CE);
@@ -103,5 +103,5 @@ X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE,
return 0;
return MCSymbolRefExpr::Create(
- getSymbol(*Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
+ getSymbol(Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
}
diff --git a/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h
index 77046e2b42..6220b9acf9 100644
--- a/lib/Target/X86/X86TargetObjectFile.h
+++ b/lib/Target/X86/X86TargetObjectFile.h
@@ -20,7 +20,7 @@ namespace llvm {
/// x86-64.
class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
public:
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
@@ -28,7 +28,7 @@ namespace llvm {
// getCFIPersonalitySymbol - The symbol that gets passed to
// .cfi_personality.
- MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+ MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const
LLVM_OVERRIDE;
};
@@ -46,7 +46,7 @@ namespace llvm {
/// \brief This implementation is used for Windows targets on x86 and x86-64.
class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE,
- Mangler *Mang) const
+ Mangler &Mang) const
LLVM_OVERRIDE;
};