[llvm] 4750b62 - [AsmParser] Use toString() (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 01:05:26 PDT 2022
Author: Nikita Popov
Date: 2022-07-13T10:05:19+02:00
New Revision: 4750b62121052dd2f095502712f95cb0859a4af8
URL: https://github.com/llvm/llvm-project/commit/4750b62121052dd2f095502712f95cb0859a4af8
DIFF: https://github.com/llvm/llvm-project/commit/4750b62121052dd2f095502712f95cb0859a4af8.diff
LOG: [AsmParser] Use toString() (NFC)
Added:
Modified:
llvm/lib/AsmParser/LLParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 62158d3065814..a878a5504629b 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -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);
More information about the llvm-commits
mailing list