Path: blob/main/contrib/llvm-project/llvm/tools/llvm-cxxdump/Error.h
35258 views
//===- Error.h - system_error extensions for llvm-cxxdump -------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This declares a new error_category for the llvm-cxxdump tool.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_TOOLS_LLVM_CXXDUMP_ERROR_H13#define LLVM_TOOLS_LLVM_CXXDUMP_ERROR_H1415#include <system_error>1617namespace llvm {18const std::error_category &cxxdump_category();1920enum class cxxdump_error {21success = 0,22file_not_found,23unrecognized_file_format,24};2526inline std::error_code make_error_code(cxxdump_error e) {27return std::error_code(static_cast<int>(e), cxxdump_category());28}2930} // namespace llvm3132namespace std {33template <>34struct is_error_code_enum<llvm::cxxdump_error> : std::true_type {};35}3637#endif383940