diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-09 14:50:44 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-09 14:50:44 +0000 |
commit | 965e3bc5ff578d9b5af706237c20c7bc2c66aacc (patch) | |
tree | 3efccb0676861602db1f30b5ba80199a9211dff1 /lib/Target/TargetLoweringObjectFile.cpp | |
parent | cc719cf87f311dcd7c10b17d653bdc41f10264ca (diff) | |
download | llvm-965e3bc5ff578d9b5af706237c20c7bc2c66aacc.tar.gz llvm-965e3bc5ff578d9b5af706237c20c7bc2c66aacc.tar.bz2 llvm-965e3bc5ff578d9b5af706237c20c7bc2c66aacc.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | lib/Target/TargetLoweringObjectFile.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index 8c98dd87b6..a0218a83df 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -101,15 +101,15 @@ static bool IsNullTerminatedString(const Constant *C) { /// Return the MCSymbol for the specified global value. This /// symbol is the main label that is the address of the global. -MCSymbol *TargetLoweringObjectFile::getSymbol(Mangler &M, - const GlobalValue *GV) const { +MCSymbol *TargetLoweringObjectFile::getSymbol(const GlobalValue *GV, + Mangler &M) const { SmallString<60> NameStr; M.getNameWithPrefix(NameStr, GV); return Ctx->GetOrCreateSymbol(NameStr.str()); } MCSymbol *TargetLoweringObjectFile::getSymbolWithGlobalValueBase( - Mangler &M, const GlobalValue *GV, StringRef Suffix) const { + const GlobalValue *GV, StringRef Suffix, Mangler &M) const { assert(!Suffix.empty()); SmallString<60> NameStr; @@ -122,7 +122,7 @@ MCSymbol *TargetLoweringObjectFile::getSymbolWithGlobalValueBase( MCSymbol *TargetLoweringObjectFile:: getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, MachineModuleInfo *MMI) const { - return getSymbol(Mang, GV); + return getSymbol(GV, Mang); } void TargetLoweringObjectFile::emitPersonalityValue(MCStreamer &Streamer, @@ -310,12 +310,11 @@ TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const { /// getTTypeGlobalReference - Return an MCExpr to use for a /// reference to the specified global variable from exception /// handling information. -const MCExpr *TargetLoweringObjectFile:: -getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang, - MachineModuleInfo *MMI, unsigned Encoding, - MCStreamer &Streamer) const { +const MCExpr *TargetLoweringObjectFile::getTTypeGlobalReference( + const GlobalValue *GV, unsigned Encoding, Mangler &Mang, + MachineModuleInfo *MMI, MCStreamer &Streamer) const { const MCSymbolRefExpr *Ref = - MCSymbolRefExpr::Create(getSymbol(Mang, GV), getContext()); + MCSymbolRefExpr::Create(getSymbol(GV, Mang), getContext()); return getTTypeReference(Ref, Encoding, Streamer); } |