Reapply r311165:

Disable PDB support in LLVMSymbolizer for now, to avoid llvm-objdump
pulling in all the PDB handling code.
This commit is contained in:
Dimitry Andric 2020-08-02 18:18:16 +00:00
parent f824666886
commit cfe333b850
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang1100-import/; revision=363776

View File

@ -553,6 +553,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
StringRef PDBFileName;
auto EC = CoffObject->getDebugPDBInfo(DebugInfo, PDBFileName);
if (!EC && DebugInfo != nullptr && !PDBFileName.empty()) {
#if 0
using namespace pdb;
std::unique_ptr<IPDBSession> Session;
PDB_ReaderType ReaderType = Opts.UseNativePDBReader
@ -565,6 +566,11 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
return createFileError(PDBFileName, 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)