From 15b26696afe37e40adad3a9806ee11886b3ea349 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 9 Feb 2014 14:50:44 +0000 Subject: Use a consistent argument order in TargetLoweringObjectFile. These methods normally call each other and it is really annoying if the arguments are in different order. The more common rule was that the arguments specific to call are first (GV, Encoding, Suffix) and the auxiliary objects (Mang, TM) come after. This patch changes the exceptions. llvm-svn: 201044 --- llvm/lib/Target/X86/X86TargetObjectFile.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 bf28495c807..c5ba3ecd91f 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp +++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp @@ -18,29 +18,28 @@ using namespace llvm; using namespace dwarf; -const MCExpr *X86_64MachoTargetObjectFile:: -getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang, - MachineModuleInfo *MMI, unsigned Encoding, - MCStreamer &Streamer) const { +const MCExpr *X86_64MachoTargetObjectFile::getTTypeGlobalReference( + const GlobalValue *GV, unsigned Encoding, Mangler &Mang, + MachineModuleInfo *MMI, 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(GV, Mang); const MCExpr *Res = MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext()); const MCExpr *Four = MCConstantExpr::Create(4, getContext()); return MCBinaryExpr::CreateAdd(Res, Four, getContext()); } - return TargetLoweringObjectFileMachO:: - getTTypeGlobalReference(GV, Mang, MMI, Encoding, Streamer); + return TargetLoweringObjectFileMachO::getTTypeGlobalReference( + GV, Encoding, Mang, MMI, Streamer); } MCSymbol *X86_64MachoTargetObjectFile:: getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, MachineModuleInfo *MMI) const { - return getSymbol(Mang, GV); + return getSymbol(GV, Mang); } void @@ -103,5 +102,5 @@ X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE, return 0; return MCSymbolRefExpr::Create( - getSymbol(Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext()); + getSymbol(GVLHS, Mang), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext()); } -- cgit v1.2.3