mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-18 21:24:32 -04:00
[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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user