LLVM  6.0.0svn
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 
11 
12 #include "llvm/ADT/StringRef.h"
13 
14 using namespace llvm;
15 
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 }
ErrorHolder TakeError(Error Err)
Definition: Error.cpp:16
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
std::string toString(Error E)
Write all error messages (if any) in E to a string.
Definition: Error.h:947
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156