[llvm] r229590 - Twines should be passed by const ref.
Rafael Espindola
rafael.espindola at gmail.com
Tue Feb 17 15:44:22 PST 2015
Author: rafael
Date: Tue Feb 17 17:44:22 2015
New Revision: 229590
URL: http://llvm.org/viewvc/llvm-project?rev=229590&view=rev
Log:
Twines should be passed by const ref.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=229590&r1=229589&r2=229590&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Feb 17 17:44:22 2015
@@ -308,10 +308,10 @@ public:
public:
/// Return the MCSymbol corresponding to the assembler temporary label with
/// the specified stem and unique ID.
- MCSymbol *GetTempSymbol(Twine Name, unsigned ID) const;
+ MCSymbol *GetTempSymbol(const Twine &Name, unsigned ID) const;
/// Return an assembler temporary label with the specified stem.
- MCSymbol *GetTempSymbol(Twine Name) const;
+ MCSymbol *GetTempSymbol(const Twine &Name) const;
/// Return the MCSymbol for a private symbol with global value name as its
/// base, with the specified suffix.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=229590&r1=229589&r2=229590&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 17 17:44:22 2015
@@ -2064,7 +2064,7 @@ void AsmPrinter::printOffset(int64_t Off
/// GetTempSymbol - Return the MCSymbol corresponding to the assembler
/// temporary label with the specified stem and unique ID.
-MCSymbol *AsmPrinter::GetTempSymbol(Twine Name, unsigned ID) const {
+MCSymbol *AsmPrinter::GetTempSymbol(const Twine &Name, unsigned ID) const {
const DataLayout *DL = TM.getDataLayout();
return OutContext.GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix()) +
Name + Twine(ID));
@@ -2072,7 +2072,7 @@ MCSymbol *AsmPrinter::GetTempSymbol(Twin
/// GetTempSymbol - Return an assembler temporary label with the specified
/// stem.
-MCSymbol *AsmPrinter::GetTempSymbol(Twine Name) const {
+MCSymbol *AsmPrinter::GetTempSymbol(const Twine &Name) const {
const DataLayout *DL = TM.getDataLayout();
return OutContext.GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
Name);
More information about the llvm-commits
mailing list