mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Some PDBs or object files can contain references to other PDBs where the real type information lives. When this happens, all type indices in the original PDB are meaningless because their records are not there. With this patch we add the ability to pull type info from those secondary PDBs. Differential Revision: https://reviews.llvm.org/D29973 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295382 91177308-0d34-0410-b5e6-96231b3b80d8
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
//===- CodeViewError.h - Error extensions for CodeView ----------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_DEBUGINFO_PDB_CODEVIEW_CODEVIEWERROR_H
|
|
#define LLVM_DEBUGINFO_PDB_CODEVIEW_CODEVIEWERROR_H
|
|
|
|
#include "llvm/Support/Error.h"
|
|
|
|
#include <string>
|
|
|
|
namespace llvm {
|
|
namespace codeview {
|
|
enum class cv_error_code {
|
|
unspecified = 1,
|
|
insufficient_buffer,
|
|
operation_unsupported,
|
|
corrupt_record,
|
|
no_records,
|
|
unknown_member_record,
|
|
};
|
|
|
|
/// Base class for errors originating when parsing raw PDB files
|
|
class CodeViewError : public ErrorInfo<CodeViewError> {
|
|
public:
|
|
static char ID;
|
|
CodeViewError(cv_error_code C);
|
|
CodeViewError(const std::string &Context);
|
|
CodeViewError(cv_error_code C, const std::string &Context);
|
|
|
|
void log(raw_ostream &OS) const override;
|
|
const std::string &getErrorMessage() const;
|
|
std::error_code convertToErrorCode() const override;
|
|
|
|
private:
|
|
std::string ErrMsg;
|
|
cv_error_code Code;
|
|
};
|
|
}
|
|
}
|
|
#endif
|