You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.246
Former-commit-id: 0c7ce5b1a7851e13f22acfd379b7f9fb304e4833
This commit is contained in:
parent
a7724cd563
commit
279aa8f685
41
external/llvm/tools/llvm-readobj/Error.h
vendored
Normal file
41
external/llvm/tools/llvm-readobj/Error.h
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
//===- Error.h - system_error extensions for llvm-readobj -------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This declares a new error_category for the llvm-readobj tool.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TOOLS_LLVM_READOBJ_ERROR_H
|
||||
#define LLVM_TOOLS_LLVM_READOBJ_ERROR_H
|
||||
|
||||
#include <system_error>
|
||||
|
||||
namespace llvm {
|
||||
const std::error_category &readobj_category();
|
||||
|
||||
enum class readobj_error {
|
||||
success = 0,
|
||||
file_not_found,
|
||||
unsupported_file_format,
|
||||
unrecognized_file_format,
|
||||
unsupported_obj_file_format,
|
||||
unknown_symbol
|
||||
};
|
||||
|
||||
inline std::error_code make_error_code(readobj_error e) {
|
||||
return std::error_code(static_cast<int>(e), readobj_category());
|
||||
}
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
namespace std {
|
||||
template <> struct is_error_code_enum<llvm::readobj_error> : std::true_type {};
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user