diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/Testing/Support/Error.cpp | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) |
Notes
Diffstat (limited to 'lib/Testing/Support/Error.cpp')
-rw-r--r-- | lib/Testing/Support/Error.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Testing/Support/Error.cpp b/lib/Testing/Support/Error.cpp index ce0da44da408..5692cdfcdf7b 100644 --- a/lib/Testing/Support/Error.cpp +++ b/lib/Testing/Support/Error.cpp @@ -14,9 +14,10 @@ using namespace llvm; llvm::detail::ErrorHolder llvm::detail::TakeError(llvm::Error Err) { - bool Succeeded = !static_cast<bool>(Err); - std::string Message; - if (!Succeeded) - Message = toString(std::move(Err)); - return {Succeeded, Message}; + std::vector<std::shared_ptr<ErrorInfoBase>> Infos; + handleAllErrors(std::move(Err), + [&Infos](std::unique_ptr<ErrorInfoBase> Info) { + Infos.emplace_back(std::move(Info)); + }); + return {std::move(Infos)}; } |