[ARM] Prevent generating NEON stack accesses under MVE.
[llvm-complete.git] / tools / llvm-readobj / Error.h
blobf390e1b96f8a213e313d975d56251823c1fb69ad
1 //===- Error.h - system_error extensions for llvm-readobj -------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This declares a new error_category for the llvm-readobj tool.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_TOOLS_LLVM_READOBJ_ERROR_H
14 #define LLVM_TOOLS_LLVM_READOBJ_ERROR_H
16 #include <system_error>
18 namespace llvm {
19 const std::error_category &readobj_category();
21 enum class readobj_error {
22 success = 0,
23 file_not_found,
24 unsupported_file_format,
25 unrecognized_file_format,
26 unsupported_obj_file_format,
27 unknown_symbol
30 inline std::error_code make_error_code(readobj_error e) {
31 return std::error_code(static_cast<int>(e), readobj_category());
34 } // namespace llvm
36 namespace std {
37 template <> struct is_error_code_enum<llvm::readobj_error> : std::true_type {};
40 #endif