From 5a83fb153f8ee6048311b2f57c505c488b3ad315 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 18 May 2017 15:14:44 +0000 Subject: Fix some minor issues in PDB parsing library. 1) Until now I'd never seen a valid PDB where the DBI stream and the PDB Stream disagreed on the "Age" field. Because of that, we had code to assert that they matched. Recently though I was given a PDB where they disagreed, so this assumption has proven to be incorrect. Remove this check. 2) We were walking the entire list of hash values for types up front and then throwing away the values. For large PDBs this was a significant slow down. Remove this. With this patch, I can dump the list of all compilands from a 1.5GB PDB file in just a few seconds. llvm-svn: 303351 --- llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp') diff --git a/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp b/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp index f7538c580ba..2f4fb6cc295 100644 --- a/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/DbiStream.cpp @@ -72,14 +72,6 @@ Error DbiStream::reload() { return make_error(raw_error_code::feature_unsupported, "Unsupported DBI version."); - auto IS = Pdb.getPDBInfoStream(); - if (!IS) - return IS.takeError(); - - if (Header->Age != IS->getAge()) - return make_error(raw_error_code::corrupt_file, - "DBI Age does not match PDB Age."); - if (Stream->getLength() != sizeof(DbiStreamHeader) + Header->ModiSubstreamSize + Header->SecContrSubstreamSize + Header->SectionMapSize + -- cgit v1.2.3