summaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/TextAPIError.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TextAPI/TextAPIError.cpp')
-rw-r--r--llvm/lib/TextAPI/TextAPIError.cpp11
1 files changed, 7 insertions, 4 deletions
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 {