mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
[TextAPI] Add error code for invalid input formats (#71824)
This commit is contained in:
@@ -21,6 +21,7 @@ enum class TextAPIErrorCode {
|
||||
NoSuchArchitecture,
|
||||
EmptyResults,
|
||||
GenericFrontendError,
|
||||
InvalidInputFormat
|
||||
};
|
||||
|
||||
class TextAPIError : public llvm::ErrorInfo<TextAPIError> {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user