LLVM
5.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lib
Testing
Support
Error.cpp
Go to the documentation of this file.
1
//===- llvm/Testing/Support/Error.cpp -------------------------------------===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "
llvm/Testing/Support/Error.h
"
11
12
#include "
llvm/ADT/StringRef.h
"
13
14
using namespace
llvm;
15
16
llvm::detail::ErrorHolder
llvm::detail::TakeError
(
llvm::Error
Err) {
17
bool
Succeeded = !
static_cast<
bool
>
(Err);
18
std::string Message;
19
if
(!Succeeded)
20
Message =
toString
(std::move(Err));
21
return
{Succeeded, Message};
22
}
llvm::detail::TakeError
ErrorHolder TakeError(Error Err)
Definition:
Error.cpp:16
llvm::toString
std::string toString(Error E)
Write all error messages (if any) in E to a string.
Definition:
Error.h:578
llvm::detail::ErrorHolder
Definition:
SupportHelpers.h:19
Error.h
StringRef.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition:
Error.h:156
Generated on Fri Sep 1 2017 14:13:58 for LLVM by
1.8.6