[lld] r275512 - Remove unnecessary explicit call of Twine ctor.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 18:06:40 PDT 2016
Author: ruiu
Date: Thu Jul 14 20:06:40 2016
New Revision: 275512
URL: http://llvm.org/viewvc/llvm-project?rev=275512&view=rev
Log:
Remove unnecessary explicit call of Twine ctor.
Modified:
lld/trunk/COFF/ModuleDef.cpp
lld/trunk/COFF/SymbolTable.cpp
lld/trunk/COFF/Symbols.cpp
Modified: lld/trunk/COFF/ModuleDef.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/ModuleDef.cpp?rev=275512&r1=275511&r2=275512&view=diff
==============================================================================
--- lld/trunk/COFF/ModuleDef.cpp (original)
+++ lld/trunk/COFF/ModuleDef.cpp Thu Jul 14 20:06:40 2016
@@ -177,7 +177,7 @@ private:
parseVersion(&Config->MajorImageVersion, &Config->MinorImageVersion);
return;
default:
- fatal(Twine("unknown directive: ") + Tok.Value);
+ fatal("unknown directive: " + Tok.Value);
}
}
@@ -188,7 +188,7 @@ private:
if (Tok.K == Equal) {
read();
if (Tok.K != Identifier)
- fatal(Twine("identifier expected, but got ") + Tok.Value);
+ fatal("identifier expected, but got " + Tok.Value);
E.ExtName = E.Name;
E.Name = Tok.Value;
} else {
@@ -264,15 +264,15 @@ private:
void parseVersion(uint32_t *Major, uint32_t *Minor) {
read();
if (Tok.K != Identifier)
- fatal(Twine("identifier expected, but got ") + Tok.Value);
+ fatal("identifier expected, but got " + Tok.Value);
StringRef V1, V2;
std::tie(V1, V2) = Tok.Value.split('.');
if (V1.getAsInteger(10, *Major))
- fatal(Twine("integer expected, but got ") + Tok.Value);
+ fatal("integer expected, but got " + Tok.Value);
if (V2.empty())
*Minor = 0;
else if (V2.getAsInteger(10, *Minor))
- fatal(Twine("integer expected, but got ") + Tok.Value);
+ fatal("integer expected, but got " + Tok.Value);
}
Lexer Lex;
Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=275512&r1=275511&r2=275512&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Thu Jul 14 20:06:40 2016
@@ -211,7 +211,7 @@ void SymbolTable::addSymbol(SymbolBody *
// equivalent (conflicting), or more preferable, respectively.
int Comp = Existing->compare(New);
if (Comp == 0)
- fatal(Twine("duplicate symbol: ") + Existing->getDebugName() + " and " +
+ fatal("duplicate symbol: " + Existing->getDebugName() + " and " +
New->getDebugName());
if (Comp < 0)
Sym->Body = New;
@@ -356,7 +356,7 @@ void SymbolTable::addCombinedLTOObject(O
int Comp = Existing->compare(Body);
if (Comp == 0)
- fatal(Twine("LTO: unexpected duplicate symbol: ") + Name);
+ fatal("LTO: unexpected duplicate symbol: " + Name);
if (Comp < 0)
Sym->Body = Body;
}
Modified: lld/trunk/COFF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Symbols.cpp?rev=275512&r1=275511&r2=275512&view=diff
==============================================================================
--- lld/trunk/COFF/Symbols.cpp (original)
+++ lld/trunk/COFF/Symbols.cpp Thu Jul 14 20:06:40 2016
@@ -199,7 +199,7 @@ std::unique_ptr<InputFile> Lazy::getMemb
else if (Magic == file_magic::bitcode)
Obj.reset(new BitcodeFile(MBRef));
else
- fatal(Twine(File->getName()) + ": unknown file type");
+ fatal(File->getName() + ": unknown file type");
Obj->setParentName(File->getName());
return Obj;
More information about the llvm-commits
mailing list