aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Testing
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-30 16:33:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-30 16:33:32 +0000
commit51315c45ff5643a27f9c84b816db54ee870ba29b (patch)
tree1d87443fa0e53d3e6b315ce25787e64be0906bf7 /contrib/llvm/lib/Testing
parent6dfd050075216be8538ae375a22d30db72916f7e (diff)
parenteb11fae6d08f479c0799db45860a98af528fa6e7 (diff)
Merge llvm trunk r338150, and resolve conflicts.
Notes
Notes: svn path=/projects/clang700-import/; revision=336916
Diffstat (limited to 'contrib/llvm/lib/Testing')
-rw-r--r--contrib/llvm/lib/Testing/Support/Error.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/llvm/lib/Testing/Support/Error.cpp b/contrib/llvm/lib/Testing/Support/Error.cpp
index ce0da44da408..5692cdfcdf7b 100644
--- a/contrib/llvm/lib/Testing/Support/Error.cpp
+++ b/contrib/llvm/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)};
}