mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 17:43:57 +00:00
Remove unnecessary explicit call of Twine ctor.
llvm-svn: 275512
This commit is contained in:
parent
659a4f2f38
commit
5694ebbc8b
@ -177,7 +177,7 @@ private:
|
|||||||
parseVersion(&Config->MajorImageVersion, &Config->MinorImageVersion);
|
parseVersion(&Config->MajorImageVersion, &Config->MinorImageVersion);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
fatal(Twine("unknown directive: ") + Tok.Value);
|
fatal("unknown directive: " + Tok.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ private:
|
|||||||
if (Tok.K == Equal) {
|
if (Tok.K == Equal) {
|
||||||
read();
|
read();
|
||||||
if (Tok.K != Identifier)
|
if (Tok.K != Identifier)
|
||||||
fatal(Twine("identifier expected, but got ") + Tok.Value);
|
fatal("identifier expected, but got " + Tok.Value);
|
||||||
E.ExtName = E.Name;
|
E.ExtName = E.Name;
|
||||||
E.Name = Tok.Value;
|
E.Name = Tok.Value;
|
||||||
} else {
|
} else {
|
||||||
@ -264,15 +264,15 @@ private:
|
|||||||
void parseVersion(uint32_t *Major, uint32_t *Minor) {
|
void parseVersion(uint32_t *Major, uint32_t *Minor) {
|
||||||
read();
|
read();
|
||||||
if (Tok.K != Identifier)
|
if (Tok.K != Identifier)
|
||||||
fatal(Twine("identifier expected, but got ") + Tok.Value);
|
fatal("identifier expected, but got " + Tok.Value);
|
||||||
StringRef V1, V2;
|
StringRef V1, V2;
|
||||||
std::tie(V1, V2) = Tok.Value.split('.');
|
std::tie(V1, V2) = Tok.Value.split('.');
|
||||||
if (V1.getAsInteger(10, *Major))
|
if (V1.getAsInteger(10, *Major))
|
||||||
fatal(Twine("integer expected, but got ") + Tok.Value);
|
fatal("integer expected, but got " + Tok.Value);
|
||||||
if (V2.empty())
|
if (V2.empty())
|
||||||
*Minor = 0;
|
*Minor = 0;
|
||||||
else if (V2.getAsInteger(10, *Minor))
|
else if (V2.getAsInteger(10, *Minor))
|
||||||
fatal(Twine("integer expected, but got ") + Tok.Value);
|
fatal("integer expected, but got " + Tok.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Lexer Lex;
|
Lexer Lex;
|
||||||
|
@ -211,7 +211,7 @@ void SymbolTable::addSymbol(SymbolBody *New) {
|
|||||||
// equivalent (conflicting), or more preferable, respectively.
|
// equivalent (conflicting), or more preferable, respectively.
|
||||||
int Comp = Existing->compare(New);
|
int Comp = Existing->compare(New);
|
||||||
if (Comp == 0)
|
if (Comp == 0)
|
||||||
fatal(Twine("duplicate symbol: ") + Existing->getDebugName() + " and " +
|
fatal("duplicate symbol: " + Existing->getDebugName() + " and " +
|
||||||
New->getDebugName());
|
New->getDebugName());
|
||||||
if (Comp < 0)
|
if (Comp < 0)
|
||||||
Sym->Body = New;
|
Sym->Body = New;
|
||||||
@ -356,7 +356,7 @@ void SymbolTable::addCombinedLTOObject(ObjectFile *Obj) {
|
|||||||
|
|
||||||
int Comp = Existing->compare(Body);
|
int Comp = Existing->compare(Body);
|
||||||
if (Comp == 0)
|
if (Comp == 0)
|
||||||
fatal(Twine("LTO: unexpected duplicate symbol: ") + Name);
|
fatal("LTO: unexpected duplicate symbol: " + Name);
|
||||||
if (Comp < 0)
|
if (Comp < 0)
|
||||||
Sym->Body = Body;
|
Sym->Body = Body;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ std::unique_ptr<InputFile> Lazy::getMember() {
|
|||||||
else if (Magic == file_magic::bitcode)
|
else if (Magic == file_magic::bitcode)
|
||||||
Obj.reset(new BitcodeFile(MBRef));
|
Obj.reset(new BitcodeFile(MBRef));
|
||||||
else
|
else
|
||||||
fatal(Twine(File->getName()) + ": unknown file type");
|
fatal(File->getName() + ": unknown file type");
|
||||||
|
|
||||||
Obj->setParentName(File->getName());
|
Obj->setParentName(File->getName());
|
||||||
return Obj;
|
return Obj;
|
||||||
|
Loading…
Reference in New Issue
Block a user