1 //===- Error.h - system_error extensions for obj2yaml -----------*- 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 #ifndef LLVM_TOOLS_OBJ2YAML_ERROR_H
11 #define LLVM_TOOLS_OBJ2YAML_ERROR_H
13 #include <system_error>
16 const std::error_category &obj2yaml_category();
18 enum class obj2yaml_error {
21 unrecognized_file_format,
22 unsupported_obj_file_format
25 inline std::error_code make_error_code(obj2yaml_error e) {
26 return std::error_code(static_cast<int>(e), obj2yaml_category());
32 template <> struct is_error_code_enum<llvm::obj2yaml_error> : std::true_type {};