From fa0f72837f98fd13fb2dfee1712be4a8b13b0260 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 8 Feb 2014 14:53:28 +0000 Subject: 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. llvm-svn: 201025 --- llvm/lib/Target/X86/X86TargetObjectFile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Target/X86/X86TargetObjectFile.cpp') diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp index bc1064e..bf28495 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp +++ b/llvm/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(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()); } -- cgit v1.1