Remove unnecessary explicit call of Twine ctor.

llvm-svn: 275512
This commit is contained in:
Rui Ueyama 2016-07-15 01:06:40 +00:00
parent 659a4f2f38
commit 5694ebbc8b
3 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -211,7 +211,7 @@ void SymbolTable::addSymbol(SymbolBody *New) {
// 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(ObjectFile *Obj) {
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;
}

View File

@ -199,7 +199,7 @@ std::unique_ptr<InputFile> Lazy::getMember() {
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;