mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Summary: This fixes type indices for SDK or CRT static archives. Previously we'd try to look next to the archive object file path, which would not exist on the local machine. Also error out if we can't resolve a type server record. Hypothetically we can recover from this error by discarding debug info for this object, but that is not yet implemented. Reviewers: ruiu, amccarth Subscribers: aprantl, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35369 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307946 91177308-0d34-0410-b5e6-96231b3b80d8
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
//===- Error.h - system_error extensions for PDB ----------------*- 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_ERROR_H
|
|
#define LLVM_DEBUGINFO_PDB_ERROR_H
|
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/Support/Error.h"
|
|
|
|
namespace llvm {
|
|
namespace pdb {
|
|
|
|
enum class generic_error_code {
|
|
invalid_path = 1,
|
|
dia_sdk_not_present,
|
|
type_server_not_found,
|
|
unspecified,
|
|
};
|
|
|
|
/// Base class for errors originating when parsing raw PDB files
|
|
class GenericError : public ErrorInfo<GenericError> {
|
|
public:
|
|
static char ID;
|
|
GenericError(generic_error_code C);
|
|
GenericError(StringRef Context);
|
|
GenericError(generic_error_code C, StringRef Context);
|
|
|
|
void log(raw_ostream &OS) const override;
|
|
StringRef getErrorMessage() const;
|
|
std::error_code convertToErrorCode() const override;
|
|
|
|
private:
|
|
std::string ErrMsg;
|
|
generic_error_code Code;
|
|
};
|
|
}
|
|
}
|
|
#endif
|