1 //===- DIAError.h - Error extensions for PDB DIA implementation -*- 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_PDB_DIA_DIAERROR_H
11 #define LLVM_DEBUGINFO_PDB_DIA_DIAERROR_H
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Support/Error.h"
18 enum class dia_error_code {
20 could_not_create_impl,
27 /// Base class for errors originating in DIA SDK, e.g. COM calls
28 class DIAError : public ErrorInfo<DIAError> {
31 DIAError(dia_error_code C);
32 DIAError(StringRef Context);
33 DIAError(dia_error_code C, StringRef Context);
35 void log(raw_ostream &OS) const override;
36 StringRef getErrorMessage() const;
37 std::error_code convertToErrorCode() const override;