1 //===- MSFError.h - Error extensions for MSF Files --------------*- 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_DEBUGINFO_MSF_MSFERROR_H
11 #define LLVM_DEBUGINFO_MSF_MSFERROR_H
13 #include "llvm/Support/Error.h"
19 enum class msf_error_code {
32 struct is_error_code_enum<llvm::msf::msf_error_code> : std::true_type {};
37 const std::error_category &MSFErrCategory();
39 inline std::error_code make_error_code(msf_error_code E) {
40 return std::error_code(static_cast<int>(E), MSFErrCategory());
43 /// Base class for errors originating when parsing raw PDB files
44 class MSFError : public ErrorInfo<MSFError, StringError> {
46 using ErrorInfo<MSFError, StringError>::ErrorInfo; // inherit constructors
47 MSFError(const Twine &S) : ErrorInfo(S, msf_error_code::unspecified) {}
53 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H