Skip to content

Commit

Permalink
[AsmParser] Use toString() (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 13, 2022
1 parent b336cf8 commit 4750b62
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions llvm/lib/AsmParser/LLParser.cpp
Expand Up @@ -5385,13 +5385,8 @@ bool LLParser::convertValIDToValue(Type *Ty, ValID &ID, Value *&V,
case ValID::t_InlineAsm: {
if (!ID.FTy)
return error(ID.Loc, "invalid type for inline asm constraint string");
if (Error Err = InlineAsm::verify(ID.FTy, ID.StrVal2)) {
std::string Str;
raw_string_ostream OS(Str);
OS << Err;
consumeError(std::move(Err));
return error(ID.Loc, Str.c_str());
}
if (Error Err = InlineAsm::verify(ID.FTy, ID.StrVal2))
return error(ID.Loc, toString(std::move(Err)));
V = InlineAsm::get(
ID.FTy, ID.StrVal, ID.StrVal2, ID.UIntVal & 1, (ID.UIntVal >> 1) & 1,
InlineAsm::AsmDialect((ID.UIntVal >> 2) & 1), (ID.UIntVal >> 3) & 1);
Expand Down

0 comments on commit 4750b62

Please sign in to comment.