LLVM  6.0.0svn
MSFError.h
Go to the documentation of this file.
1 //===- MSFError.h - Error extensions for MSF Files --------------*- 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 #ifndef LLVM_DEBUGINFO_MSF_MSFERROR_H
11 #define LLVM_DEBUGINFO_MSF_MSFERROR_H
12 
13 #include "llvm/Support/Error.h"
14 
15 #include <string>
16 
17 namespace llvm {
18 namespace msf {
19 enum class msf_error_code {
20  unspecified = 1,
23  no_stream,
26 };
27 
28 /// Base class for errors originating when parsing raw PDB files
29 class MSFError : public ErrorInfo<MSFError> {
30 public:
31  static char ID;
33  MSFError(const std::string &Context);
34  MSFError(msf_error_code C, const std::string &Context);
35 
36  void log(raw_ostream &OS) const override;
37  const std::string &getErrorMessage() const;
38  std::error_code convertToErrorCode() const override;
39 
40 private:
41  std::string ErrMsg;
42  msf_error_code Code;
43 };
44 } // namespace msf
45 } // namespace llvm
46 
47 #endif // LLVM_DEBUGINFO_MSF_MSFERROR_H
uint64_t CallInst * C
Base class for errors originating when parsing raw PDB files.
Definition: MSFError.h:29
LLVMContext & Context
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
static char ID
Definition: MSFError.h:31
msf_error_code
Definition: MSFError.h:19
Base class for user error types.
Definition: Error.h:331
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44