1 //===- Error.h - system_error extensions for llvm-cxxdump -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This declares a new error_category for the llvm-cxxdump tool.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TOOLS_LLVM_CXXDUMP_ERROR_H
15 #define LLVM_TOOLS_LLVM_CXXDUMP_ERROR_H
17 #include <system_error>
20 const std::error_category
&cxxdump_category();
22 enum class cxxdump_error
{
25 unrecognized_file_format
,
28 inline std::error_code
make_error_code(cxxdump_error e
) {
29 return std::error_code(static_cast<int>(e
), cxxdump_category());
36 struct is_error_code_enum
<llvm::cxxdump_error
> : std::true_type
{};