[Support][Error] Make logAllUnhandledErrors take a Twine for the banner, rather

than a const string&.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274526 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2016-07-04 22:47:53 +00:00
parent cd583a893f
commit 960bd9aa6d
2 changed files with 11 additions and 11 deletions
+9
View File
@@ -54,6 +54,15 @@ char ErrorList::ID = 0;
char ECError::ID = 0;
char StringError::ID = 0;
void logAllUnhandledErrors(Error E, raw_ostream &OS, Twine ErrorBanner) {
if (!E)
return;
OS << ErrorBanner;
handleAllErrors(std::move(E), [&](const ErrorInfoBase &EI) {
EI.log(OS);
OS << "\n";
});
}
std::error_code ErrorList::convertToErrorCode() const {
return std::error_code(static_cast<int>(ErrorErrorCode::MultipleErrors),