llvm.org GIT mirror llvm / 0444f57
[DebugInfo] Common behavior for error types Following D50807, and heading towards D50664, this intermediary change does the following: 1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/ to use the new StringError behavior (D50807). 2. Implement std::is_error_code_enum and make_error_code() for DebugInfo error enumerations. 3. Rename GenericError -> PDBError (the file will be renamed in a subsequent commit) 4. Update custom error messages to follow the same formatting: (\w\s*)+\. 5. Keep generic "file not found" (ENOENT) errors as they are in PDB code. Previously, there used to be a custom enumeration for that purpose. 6. Remove a few extraneous LF in log() implementations. Printing LF is a responsability at a higher level, not at the error level. Differential Revision: https://reviews.llvm.org/D51499 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341228 91177308-0d34-0410-b5e6-96231b3b80d8 Alexandre Ganea 1 year, 21 days ago
24 changed file(s) with 155 addition(s) and 238 deletion(s). Raw diff Collapse all Expand all
2323 no_records,
2424 unknown_member_record,
2525 };
26 } // namespace codeview
27 } // namespace llvm
28
29 namespace std {
30 template <>
31 struct is_error_code_enum : std::true_type {};
32 } // namespace std
33
34 namespace llvm {
35 namespace codeview {
36 const std::error_category &CVErrorCategory();
37
38 inline std::error_code make_error_code(cv_error_code E) {
39 return std::error_code(static_cast(E), CVErrorCategory());
40 }
2641
2742 /// Base class for errors originating when parsing raw PDB files
28 class CodeViewError : public ErrorInfo> {
43 class CodeViewError : public ErrorInfo, StringError> {
2944 public:
45 using ErrorInfo
46 StringError>::ErrorInfo; // inherit constructors
47 CodeViewError(const Twine &S) : ErrorInfo(S, cv_error_code::unspecified) {}
3048 static char ID;
31 CodeViewError(cv_error_code C);
32 CodeViewError(const std::string &Context);
33 CodeViewError(cv_error_code C, const std::string &Context);
49 };
3450
35 void log(raw_ostream &OS) const override;
36 const std::string &getErrorMessage() const;
37 std::error_code convertToErrorCode() const override;
51 } // namespace codeview
52 } // namespace llvm
3853
39 private:
40 std::string ErrMsg;
41 cv_error_code Code;
42 };
43 }
44 }
4554 #endif
2323 invalid_format,
2424 block_in_use
2525 };
26 } // namespace msf
27 } // namespace llvm
28
29 namespace std {
30 template <>
31 struct is_error_code_enum : std::true_type {};
32 } // namespace std
33
34 namespace llvm {
35 namespace msf {
36 const std::error_category &MSFErrCategory();
37
38 inline std::error_code make_error_code(msf_error_code E) {
39 return std::error_code(static_cast(E), MSFErrCategory());
40 }
2641
2742 /// Base class for errors originating when parsing raw PDB files
28 class MSFError : public ErrorInfo> {
43 class MSFError : public ErrorInfo, StringError> {
2944 public:
45 using ErrorInfo::ErrorInfo; // inherit constructors
46 MSFError(const Twine &S) : ErrorInfo(S, msf_error_code::unspecified) {}
3047 static char ID;
31 MSFError(msf_error_code C);
32 MSFError(const std::string &Context);
33 MSFError(msf_error_code C, const std::string &Context);
34
35 void log(raw_ostream &OS) const override;
36 const std::string &getErrorMessage() const;
37 std::error_code convertToErrorCode() const override;
38
39 private:
40 std::string ErrMsg;
41 msf_error_code Code;
4248 };
4349 } // namespace msf
4450 } // namespace llvm
2222 already_loaded,
2323 debug_info_mismatch,
2424 };
25 } // namespace pdb
26 } // namespace llvm
27
28 namespace std {
29 template <>
30 struct is_error_code_enum : std::true_type {};
31 } // namespace std
32
33 namespace llvm {
34 namespace pdb {
35 const std::error_category &DIAErrCategory();
36
37 inline std::error_code make_error_code(dia_error_code E) {
38 return std::error_code(static_cast(E), DIAErrCategory());
39 }
2540
2641 /// Base class for errors originating in DIA SDK, e.g. COM calls
27 class DIAError : public ErrorInfo> {
42 class DIAError : public ErrorInfo, StringError> {
2843 public:
44 using ErrorInfo::ErrorInfo;
45 DIAError(const Twine &S) : ErrorInfo(S, dia_error_code::unspecified) {}
2946 static char ID;
30 DIAError(dia_error_code C);
31 DIAError(StringRef Context);
32 DIAError(dia_error_code C, StringRef Context);
33
34 void log(raw_ostream &OS) const override;
35 StringRef getErrorMessage() const;
36 std::error_code convertToErrorCode() const override;
37
38 private:
39 std::string ErrMsg;
40 dia_error_code Code;
4147 };
42 }
43 }
48 } // namespace pdb
49 } // namespace llvm
4450 #endif
1515 namespace llvm {
1616 namespace pdb {
1717
18 enum class generic_error_code {
19 invalid_path = 1,
18 enum class pdb_error_code {
19 invalid_utf8_path = 1,
2020 dia_sdk_not_present,
21 dia_failed_loading,
22 signature_out_of_date,
2123 type_server_not_found,
2224 unspecified,
2325 };
26 } // namespace codeview
27 } // namespace llvm
28
29 namespace std {
30 template <>
31 struct is_error_code_enum : std::true_type {};
32 } // namespace std
33
34 namespace llvm {
35 namespace pdb {
36 const std::error_category &PDBErrCategory();
37
38 inline std::error_code make_error_code(pdb_error_code E) {
39 return std::error_code(static_cast(E), PDBErrCategory());
40 }
2441
2542 /// Base class for errors originating when parsing raw PDB files
26 class GenericError : public ErrorInfoError> {
43 class PDBError : public ErrorInfoError> {
2744 public:
45 using ErrorInfo::ErrorInfo; // inherit constructors
46 PDBError(const Twine &S) : ErrorInfo(S, pdb_error_code::unspecified) {}
2847 static char ID;
29 GenericError(generic_error_code C);
30 GenericError(StringRef Context);
31 GenericError(generic_error_code C, StringRef Context);
32
33 void log(raw_ostream &OS) const override;
34 StringRef getErrorMessage() const;
35 std::error_code convertToErrorCode() const override;
36
37 private:
38 std::string ErrMsg;
39 generic_error_code Code;
4048 };
41 }
42 }
49 } // namespace pdb
50 } // namespace llvm
4351 #endif
3030 stream_too_long,
3131 invalid_tpi_hash,
3232 };
33 } // namespace pdb
34 } // namespace llvm
35
36 namespace std {
37 template <>
38 struct is_error_code_enum : std::true_type {};
39 } // namespace std
40
41 namespace llvm {
42 namespace pdb {
43 const std::error_category &RawErrCategory();
44
45 inline std::error_code make_error_code(raw_error_code E) {
46 return std::error_code(static_cast(E), RawErrCategory());
47 }
3348
3449 /// Base class for errors originating when parsing raw PDB files
35 class RawError : public ErrorInfo> {
50 class RawError : public ErrorInfo, StringError> {
3651 public:
52 using ErrorInfo::ErrorInfo; // inherit constructors
53 RawError(const Twine &S) : ErrorInfo(S, raw_error_code::unspecified) {}
3754 static char ID;
38 RawError(raw_error_code C);
39 RawError(const std::string &Context);
40 RawError(raw_error_code C, const std::string &Context);
41
42 void log(raw_ostream &OS) const override;
43 const std::string &getErrorMessage() const;
44 std::error_code convertToErrorCode() const override;
45
46 private:
47 std::string ErrMsg;
48 raw_error_code Code;
4955 };
50 }
51 }
56 } // namespace pdb
57 } // namespace llvm
5258 #endif
1313 using namespace llvm;
1414 using namespace llvm::codeview;
1515
16 namespace {
1716 // FIXME: This class is only here to support the transition to llvm::Error. It
1817 // will be removed once this transition is complete. Clients should prefer to
1918 // deal with the Error value directly, rather than converting to error_code.
2019 class CodeViewErrorCategory : public std::error_category {
2120 public:
2221 const char *name() const noexcept override { return "llvm.codeview"; }
23
2422 std::string message(int Condition) const override {
2523 switch (static_cast(Condition)) {
2624 case cv_error_code::unspecified:
27 return "An unknown error has occurred.";
25 return "An unknown CodeView error has occurred.";
2826 case cv_error_code::insufficient_buffer:
2927 return "The buffer is not large enough to read the requested number of "
3028 "bytes.";
3129 case cv_error_code::corrupt_record:
3230 return "The CodeView record is corrupted.";
3331 case cv_error_code::no_records:
34 return "There are no records";
32 return "There are no records.";
3533 case cv_error_code::operation_unsupported:
3634 return "The requested operation is not supported.";
3735 case cv_error_code::unknown_member_record:
4038 llvm_unreachable("Unrecognized cv_error_code");
4139 }
4240 };
43 } // end anonymous namespace
4441
45 static ManagedStatic Category;
42 static llvm::ManagedStatic CodeViewErrCategory;
43 const std::error_category &llvm::codeview::CVErrorCategory() { return *CodeViewErrCategory; }
4644
47 char CodeViewError::ID = 0;
48
49 CodeViewError::CodeViewError(cv_error_code C) : CodeViewError(C, "") {}
50
51 CodeViewError::CodeViewError(const std::string &Context)
52 : CodeViewError(cv_error_code::unspecified, Context) {}
53
54 CodeViewError::CodeViewError(cv_error_code C, const std::string &Context)
55 : Code(C) {
56 ErrMsg = "CodeView Error: ";
57 std::error_code EC = convertToErrorCode();
58 if (Code != cv_error_code::unspecified)
59 ErrMsg += EC.message() + " ";
60 if (!Context.empty())
61 ErrMsg += Context;
62 }
63
64 void CodeViewError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
65
66 const std::string &CodeViewError::getErrorMessage() const { return ErrMsg; }
67
68 std::error_code CodeViewError::convertToErrorCode() const {
69 return std::error_code(static_cast(Code), *Category);
70 }
45 char CodeViewError::ID;
325325 "second pass found more bad indices");
326326 if (!LastError && NumBadIndices == BadIndicesRemaining) {
327327 return llvm::make_error(
328 cv_error_code::corrupt_record, "input type graph contains cycles");
328 cv_error_code::corrupt_record, "Input type graph contains cycles");
329329 }
330330 }
331331
1313 using namespace llvm;
1414 using namespace llvm::msf;
1515
16 namespace {
1716 // FIXME: This class is only here to support the transition to llvm::Error. It
1817 // will be removed once this transition is complete. Clients should prefer to
1918 // deal with the Error value directly, rather than converting to error_code.
2019 class MSFErrorCategory : public std::error_category {
2120 public:
2221 const char *name() const noexcept override { return "llvm.msf"; }
23
2422 std::string message(int Condition) const override {
2523 switch (static_cast(Condition)) {
2624 case msf_error_code::unspecified:
4038 llvm_unreachable("Unrecognized msf_error_code");
4139 }
4240 };
43 } // end anonymous namespace
4441
45 static ManagedStatic Category;
42 static llvm::ManagedStatic MSFCategory;
43 const std::error_category &llvm::msf::MSFErrCategory() { return *MSFCategory; }
4644
47 char MSFError::ID = 0;
48
49 MSFError::MSFError(msf_error_code C) : MSFError(C, "") {}
50
51 MSFError::MSFError(const std::string &Context)
52 : MSFError(msf_error_code::unspecified, Context) {}
53
54 MSFError::MSFError(msf_error_code C, const std::string &Context) : Code(C) {
55 ErrMsg = "MSF Error: ";
56 std::error_code EC = convertToErrorCode();
57 if (Code != msf_error_code::unspecified)
58 ErrMsg += EC.message() + " ";
59 if (!Context.empty())
60 ErrMsg += Context;
61 }
62
63 void MSFError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
64
65 const std::string &MSFError::getErrorMessage() const { return ErrMsg; }
66
67 std::error_code MSFError::convertToErrorCode() const {
68 return std::error_code(static_cast(Code), *Category);
69 }
45 char MSFError::ID;
1010 class DIAErrorCategory : public std::error_category {
1111 public:
1212 const char *name() const noexcept override { return "llvm.pdb.dia"; }
13
1413 std::string message(int Condition) const override {
1514 switch (static_cast(Condition)) {
1615 case dia_error_code::could_not_create_impl:
17 return "Failed to connect to DIA at runtime. Verify that Visual Studio "
16 return "Failed to connect to DIA at runtime. Verify that Visual Studio "
1817 "is properly installed, or that msdiaXX.dll is in your PATH.";
1918 case dia_error_code::invalid_file_format:
20 return "Unable to load PDB. The file has an unrecognized format.";
19 return "Unable to load PDB. The file has an unrecognized format.";
2120 case dia_error_code::invalid_parameter:
2221 return "The parameter is incorrect.";
2322 case dia_error_code::already_loaded:
3130 }
3231 };
3332
34 static ManagedStatic Category;
33 static llvm::ManagedStatic DIACategory;
34 const std::error_category &llvm::pdb::DIAErrCategory() { return *DIACategory; }
3535
36 char DIAError::ID = 0;
37
38 DIAError::DIAError(dia_error_code C) : DIAError(C, "") {}
39
40 DIAError::DIAError(StringRef Context)
41 : DIAError(dia_error_code::unspecified, Context) {}
42
43 DIAError::DIAError(dia_error_code C, StringRef Context) : Code(C) {
44 ErrMsg = "DIA Error: ";
45 std::error_code EC = convertToErrorCode();
46 ErrMsg += EC.message() + " ";
47 if (!Context.empty())
48 ErrMsg += Context;
49 }
50
51 void DIAError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
52
53 StringRef DIAError::getErrorMessage() const { return ErrMsg; }
54
55 std::error_code DIAError::convertToErrorCode() const {
56 return std::error_code(static_cast(Code), *Category);
57 }
36 char DIAError::ID;
4141
4242 switch (Result) {
4343 case E_PDB_NOT_FOUND:
44 return make_error(generic_error_code::invalid_path, Context);
44 return errorCodeToError(std::error_code(ENOENT, std::generic_category()));
4545 case E_PDB_FORMAT:
4646 return make_error(dia_error_code::invalid_file_format, Context);
4747 case E_INVALIDARG:
7070 // If the CoCreateInstance call above failed, msdia*.dll is not registered.
7171 // Try loading the DLL corresponding to the #included DIA SDK.
7272 #if !defined(_MSC_VER)
73 return llvm::make_error(
74 "DIA is only supported when using MSVC.");
73 return llvm::make_error(pdb_error_code::dia_failed_loading);
7574 #else
7675 const wchar_t *msdia_dll = nullptr;
7776 #if _MSC_VER >= 1900 && _MSC_VER < 2000
103102
104103 llvm::SmallVector Path16;
105104 if (!llvm::convertUTF8ToUTF16String(Path, Path16))
106 return make_error<GenericError>(generic_error_code::invalid_path);
105 return make_error<PDBError>(pdb_error_code::invalid_utf8_path, Path);
107106
108107 const wchar_t *Path16Str = reinterpret_cast(Path16.data());
109108 HRESULT HR;
129128
130129 llvm::SmallVector Path16;
131130 if (!llvm::convertUTF8ToUTF16String(Path, Path16))
132 return make_error<GenericError>(generic_error_code::invalid_path, Path);
131 return make_error<PDBError>(pdb_error_code::invalid_utf8_path, Path);
133132
134133 const wchar_t *Path16Str = reinterpret_cast(Path16.data());
135134 HRESULT HR;
1313 using namespace llvm;
1414 using namespace llvm::pdb;
1515
16 namespace {
1716 // FIXME: This class is only here to support the transition to llvm::Error. It
1817 // will be removed once this transition is complete. Clients should prefer to
1918 // deal with the Error value directly, rather than converting to error_code.
20 class GenericErrorCategory : public std::error_category {
19 class PDBErrorCategory : public std::error_category {
2120 public:
2221 const char *name() const noexcept override { return "llvm.pdb"; }
23
2422 std::string message(int Condition) const override {
25 switch (static_cast(Condition)) {
26 case generic_error_code::unspecified:
23 switch (static_cast(Condition)) {
24 case pdb_error_code::unspecified:
2725 return "An unknown error has occurred.";
28 case generic_error_code::type_server_not_found:
29 return "Type server PDB was not found.";
30 case generic_error_code::dia_sdk_not_present:
31 return "LLVM was not compiled with support for DIA. This usually means "
26 case pdb_error_code::type_server_not_found:
27 return "Type server PDB was not found.";
28 case pdb_error_code::dia_sdk_not_present:
29 return "LLVM was not compiled with support for DIA. This usually means "
3230 "that you are not using MSVC, or your Visual Studio "
33 "installation "
34 "is corrupt.";
35 case generic_error_code::invalid_path:
36 return "Unable to load PDB. Make sure the file exists and is readable.";
31 "installation is corrupt.";
32 case pdb_error_code::dia_failed_loading:
33 return "DIA is only supported when using MSVC.";
34 case pdb_error_code::invalid_utf8_path:
35 return "The PDB file path is an invalid UTF8 sequence.";
36 case pdb_error_code::signature_out_of_date:
37 return "The signature does not match; the file(s) might be out of date";
3738 }
3839 llvm_unreachable("Unrecognized generic_error_code");
3940 }
4041 };
41 } // end anonymous namespace
4242
43 static ManagedStatic Category;
43 static llvm::ManagedStatic PDBCategory;
44 const std::error_category &llvm::pdb::PDBErrCategory() { return *PDBCategory; }
4445
45 char GenericError::ID = 0;
46
47 GenericError::GenericError(generic_error_code C) : GenericError(C, "") {}
48
49 GenericError::GenericError(StringRef Context)
50 : GenericError(generic_error_code::unspecified, Context) {}
51
52 GenericError::GenericError(generic_error_code C, StringRef Context) : Code(C) {
53 ErrMsg = "PDB Error: ";
54 std::error_code EC = convertToErrorCode();
55 if (Code != generic_error_code::unspecified)
56 ErrMsg += EC.message() + " ";
57 if (!Context.empty())
58 ErrMsg += Context;
59 }
60
61 void GenericError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
62
63 StringRef GenericError::getErrorMessage() const { return ErrMsg; }
64
65 std::error_code GenericError::convertToErrorCode() const {
66 return std::error_code(static_cast(Code), *Category);
67 }
46 char PDBError::ID;
1010
1111 #include "llvm/ADT/STLExtras.h"
1212 #include "llvm/DebugInfo/CodeView/TypeIndex.h"
13 #include "llvm/DebugInfo/PDB/GenericError.h"
1413 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
1514 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
1615 #include "llvm/DebugInfo/PDB/Native/NativeBuiltinSymbol.h"
124124 if (auto EC = Reader.readObject(SB)) {
125125 consumeError(std::move(EC));
126126 return make_error(raw_error_code::corrupt_file,
127 "Does not contain superblock");
127 "MSF superblock is missing");
128128 }
129129
130130 if (auto EC = msf::validateSuperBlock(*SB))
1111 #include "llvm/ADT/BitVector.h"
1212
1313 #include "llvm/DebugInfo/MSF/MSFBuilder.h"
14 #include "llvm/DebugInfo/PDB/GenericError.h"
1514 #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
1615 #include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h"
1716 #include "llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h"
44 using namespace llvm;
55 using namespace llvm::pdb;
66
7 namespace {
87 // FIXME: This class is only here to support the transition to llvm::Error. It
98 // will be removed once this transition is complete. Clients should prefer to
109 // deal with the Error value directly, rather than converting to error_code.
1110 class RawErrorCategory : public std::error_category {
1211 public:
1312 const char *name() const noexcept override { return "llvm.pdb.raw"; }
14
1513 std::string message(int Condition) const override {
1614 switch (static_cast(Condition)) {
1715 case raw_error_code::unspecified:
4543 llvm_unreachable("Unrecognized raw_error_code");
4644 }
4745 };
48 } // end anonymous namespace
4946
50 static ManagedStatic Category;
47 static llvm::ManagedStatic RawCategory;
48 const std::error_category &llvm::pdb::RawErrCategory() { return *RawCategory; }
5149
52 char RawError::ID = 0;
53
54 RawError::RawError(raw_error_code C) : RawError(C, "") {}
55
56 RawError::RawError(const std::string &Context)
57 : RawError(raw_error_code::unspecified, Context) {}
58
59 RawError::RawError(raw_error_code C, const std::string &Context) : Code(C) {
60 ErrMsg = "Native PDB Error: ";
61 std::error_code EC = convertToErrorCode();
62 if (Code != raw_error_code::unspecified)
63 ErrMsg += EC.message() + " ";
64 if (!Context.empty())
65 ErrMsg += Context;
66 }
67
68 void RawError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
69
70 const std::string &RawError::getErrorMessage() const { return ErrMsg; }
71
72 std::error_code RawError::convertToErrorCode() const {
73 return std::error_code(static_cast(Code), *Category);
74 }
50 char RawError::ID;
2828 MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1,
2929 /*RequiresNullTerminator=*/false);
3030 if (!ErrorOrBuffer)
31 return make_error(generic_error_code::invalid_path, Path);
31 return errorCodeToError(ErrorOrBuffer.getError());
3232
3333 return NativeSession::createFromPdb(std::move(*ErrorOrBuffer), Session);
3434 }
3636 #if LLVM_ENABLE_DIA_SDK
3737 return DIASession::createFromPdb(Path, Session);
3838 #else
39 return make_error<GenericError>("DIA is not installed on the system");
39 return make_error<PDBError>(pdb_error_code::dia_sdk_not_present);
4040 #endif
4141 }
4242
4949 #if LLVM_ENABLE_DIA_SDK
5050 return DIASession::createFromExe(Path, Session);
5151 #else
52 return make_error<GenericError>("DIA is not installed on the system");
52 return make_error<PDBError>(pdb_error_code::dia_sdk_not_present);
5353 #endif
5454 }
409409 Objects.first->getFileName(), Session)) {
410410 Modules.insert(
411411 std::make_pair(ModuleName, std::unique_ptr()));
412 return std::move(Err);
412 // Return along the PDB filename to provide more context
413 return createFileError(PDBFileName, std::move(Err));
413414 }
414415 Context.reset(new PDBContext(*CoffObject, std::move(Session)));
415416 }
4646 }
4747 }
4848
49 void BinaryStreamError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
49 void BinaryStreamError::log(raw_ostream &OS) const { OS << ErrMsg; }
5050
5151 StringRef BinaryStreamError::getErrorMessage() const { return ErrMsg; }
5252
11 # RUN: llvm-pdbutil yaml2pdb -pdb=%t2.pdb %s
22 # RUN: not llvm-pdbutil merge -pdb=%t.pdb %t1.pdb %t2.pdb 2>&1 | FileCheck %s
33
4 # CHECK: CodeView Error: The CodeView record is corrupted.
4 # CHECK: The CodeView record is corrupted
55
66 ---
77 TpiStream:
11661166 BIG-NEXT: Mod 0046 | `api-ms-win-crt-heap-l1-1-0.dll`:
11671167 BIG-NEXT: Mod 0047 | `* Linker *`:
11681168
1169 BAD-BLOCK-SIZE: Native PDB Error: The PDB file is corrupt. Does not contain superblock
1169 BAD-BLOCK-SIZE: The PDB file is corrupt. MSF superblock is missing
0 ; RUN: not llvm-readobj -codeview-merged-types %S/Inputs/codeview-cycle.obj 2>&1 | FileCheck %s
11
2 ; CHECK: Error{{.*}} input type graph contains cycles
2 ; CHECK: Error{{.*}} Input type graph contains cycles
33
44 ; To reproduce codeview-cycle.obj:
55 ; $ cat codeview-cycle.asm
77
88 llvm-symbolizer should print one error and two unknown line info records.
99
10 ERROR: LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB. Make sure the file exists and is readable.
10 ERROR: LLVMSymbolizer: error reading file: {{.*}}: {{N|n}}o such file or directory
1111 ERROR-NOT: error reading file
1212
1313 CHECK: ??
4545 #include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
4646 #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h"
4747 #include "llvm/DebugInfo/MSF/MSFBuilder.h"
48 #include "llvm/DebugInfo/PDB/GenericError.h"
4948 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
5049 #include "llvm/DebugInfo/PDB/IPDBInjectedSource.h"
5150 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
680679 /*RequiresNullTerminator=*/false);
681680
682681 if (ErrorOrBuffer.getError()) {
683 ExitOnErr(make_error(generic_error_code::invalid_path, Path));
682 ExitOnErr(createFileError(Path, errorCodeToError(ErrorOrBuffer.getError())));
684683 }
685684
686685 std::unique_ptr &Buffer = ErrorOrBuffer.get();
5252
5353 char Obj2YamlError::ID = 0;
5454
55 void Obj2YamlError::log(raw_ostream &OS) const { OS << ErrMsg << "\n"; }
55 void Obj2YamlError::log(raw_ostream &OS) const { OS << ErrMsg; }
5656
5757 std::error_code Obj2YamlError::convertToErrorCode() const {
5858 return std::error_code(static_cast(Code), obj2yaml_category());