Path: blob/main/contrib/llvm-project/llvm/lib/Testing/Support/Error.cpp
35266 views
//===- llvm/Testing/Support/Error.cpp -------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/Testing/Support/Error.h"910using namespace llvm;1112llvm::detail::ErrorHolder llvm::detail::TakeError(llvm::Error Err) {13std::vector<std::shared_ptr<ErrorInfoBase>> Infos;14handleAllErrors(std::move(Err),15[&Infos](std::unique_ptr<ErrorInfoBase> Info) {16Infos.emplace_back(std::move(Info));17});18return {std::move(Infos)};19}202122