diff options
Diffstat (limited to 'tools/llvm-pdbdump/Analyze.cpp')
-rw-r--r-- | tools/llvm-pdbdump/Analyze.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tools/llvm-pdbdump/Analyze.cpp b/tools/llvm-pdbdump/Analyze.cpp index f7d6ec53b030f..ab4477ed7bad9 100644 --- a/tools/llvm-pdbdump/Analyze.cpp +++ b/tools/llvm-pdbdump/Analyze.cpp @@ -76,26 +76,15 @@ Error AnalysisStyle::dump() { TypeDatabase TypeDB(Tpi->getNumTypeRecords()); TypeDatabaseVisitor DBV(TypeDB); - TypeDeserializer Deserializer; TypeVisitorCallbackPipeline Pipeline; HashLookupVisitor Hasher(*Tpi); - // Deserialize the types - Pipeline.addCallbackToPipeline(Deserializer); // Add them to the database Pipeline.addCallbackToPipeline(DBV); // Store their hash values Pipeline.addCallbackToPipeline(Hasher); - CVTypeVisitor Visitor(Pipeline); - - bool Error = false; - for (auto Item : Tpi->types(&Error)) { - if (auto EC = Visitor.visitTypeRecord(Item)) - return EC; - } - if (Error) - return make_error<RawError>(raw_error_code::corrupt_file, - "TPI stream contained corrupt record"); + if (auto EC = codeview::visitTypeStream(Tpi->typeArray(), Pipeline)) + return EC; auto &Adjusters = Tpi->getHashAdjusters(); DenseSet<uint32_t> AdjusterSet; |