summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp')
-rw-r--r--contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index adbe0cb..7e56859 100644
--- a/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -391,10 +391,11 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
// If this is a COFF object containing PDB info, use a PDBContext to
// symbolize. Otherwise, use DWARF.
if (auto CoffObject = dyn_cast<COFFObjectFile>(Objects.first)) {
- const debug_pdb_info *PDBInfo;
+ const codeview::DebugInfo *DebugInfo;
StringRef PDBFileName;
- auto EC = CoffObject->getDebugPDBInfo(PDBInfo, PDBFileName);
- if (!EC && PDBInfo != nullptr) {
+ auto EC = CoffObject->getDebugPDBInfo(DebugInfo, PDBFileName);
+ if (!EC && DebugInfo != nullptr && !PDBFileName.empty()) {
+#if 0
using namespace pdb;
std::unique_ptr<IPDBSession> Session;
if (auto Err = loadDataForEXE(PDB_ReaderType::DIA,
@@ -404,6 +405,11 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
return std::move(Err);
}
Context.reset(new PDBContext(*CoffObject, std::move(Session)));
+#else
+ return make_error<StringError>(
+ "PDB support not compiled in",
+ std::make_error_code(std::errc::not_supported));
+#endif
}
}
if (!Context)
OpenPOWER on IntegriCloud