[llvm] d8a4011 - [TextAPI] Add error code for invalid input formats (#71824)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 13:17:45 PST 2023
Author: Cyndy Ishida
Date: 2023-11-09T13:17:41-08:00
New Revision: d8a4011f5b284ec055ceab91815d6e656c0b6dc5
URL: https://github.com/llvm/llvm-project/commit/d8a4011f5b284ec055ceab91815d6e656c0b6dc5
DIFF: https://github.com/llvm/llvm-project/commit/d8a4011f5b284ec055ceab91815d6e656c0b6dc5.diff
LOG: [TextAPI] Add error code for invalid input formats (#71824)
Added:
Modified:
llvm/include/llvm/TextAPI/TextAPIError.h
llvm/lib/TextAPI/TextAPIError.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/TextAPI/TextAPIError.h b/llvm/include/llvm/TextAPI/TextAPIError.h
index 566890db4b89a8d..a8484063d7948de 100644
--- a/llvm/include/llvm/TextAPI/TextAPIError.h
+++ b/llvm/include/llvm/TextAPI/TextAPIError.h
@@ -21,6 +21,7 @@ enum class TextAPIErrorCode {
NoSuchArchitecture,
EmptyResults,
GenericFrontendError,
+ InvalidInputFormat
};
class TextAPIError : public llvm::ErrorInfo<TextAPIError> {
diff --git a/llvm/lib/TextAPI/TextAPIError.cpp b/llvm/lib/TextAPI/TextAPIError.cpp
index 07eae7ab4100bcb..dd97381ce094c2f 100644
--- a/llvm/lib/TextAPI/TextAPIError.cpp
+++ b/llvm/lib/TextAPI/TextAPIError.cpp
@@ -23,6 +23,9 @@ void TextAPIError::log(raw_ostream &OS) const {
case TextAPIErrorCode::NoSuchArchitecture:
OS << "no such architecture\n";
return;
+ case TextAPIErrorCode::InvalidInputFormat:
+ OS << "invalid input format\n";
+ return;
default:
llvm_unreachable("unhandled TextAPIErrorCode");
}
More information about the llvm-commits
mailing list