From ec64af5994213cf7933e961a2b7fe07193a77b61 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 15 Nov 2023 09:31:31 -0800 Subject: [readtapi] Use OptParser.td for options (#72183) This includes revamping how --compare was handled and adds `-o` ontop of tablegen approach. This will be used to add more complex options. --- llvm/lib/TextAPI/TextAPIError.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'llvm/lib/TextAPI/TextAPIError.cpp') diff --git a/llvm/lib/TextAPI/TextAPIError.cpp b/llvm/lib/TextAPI/TextAPIError.cpp index dd97381ce094..23954a9e3466 100644 --- a/llvm/lib/TextAPI/TextAPIError.cpp +++ b/llvm/lib/TextAPI/TextAPIError.cpp @@ -21,14 +21,17 @@ char TextAPIError::ID = 0; void TextAPIError::log(raw_ostream &OS) const { switch (EC) { case TextAPIErrorCode::NoSuchArchitecture: - OS << "no such architecture\n"; - return; + OS << "no such architecture"; + break; case TextAPIErrorCode::InvalidInputFormat: - OS << "invalid input format\n"; - return; + OS << "invalid input format"; + break; default: llvm_unreachable("unhandled TextAPIErrorCode"); } + if (!Msg.empty()) + OS << ": " << Msg; + OS << "\n"; } std::error_code TextAPIError::convertToErrorCode() const { -- cgit v1.2.3