[PowerPC] Do not use vectors to codegen bswap with Altivec turned off
[llvm-core.git] / tools / llvm-cxxdump / Error.h
blob7caf6d6447c9e204b3f8860e37b60916db14bbe6
1 //===- Error.h - system_error extensions for llvm-cxxdump -------*- C++ -*-===//
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 //
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>
19 namespace llvm {
20 const std::error_category &cxxdump_category();
22 enum class cxxdump_error {
23 success = 0,
24 file_not_found,
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());
32 } // namespace llvm
34 namespace std {
35 template <>
36 struct is_error_code_enum<llvm::cxxdump_error> : std::true_type {};
39 #endif