diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:39 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:39 +0000 |
commit | 7af96fb3afd6725a2824a0a5ca5dad34e5e0b056 (patch) | |
tree | 6661ffbabf869009597684462f5a3df3beccc952 /tools/llvm-pdbdump/Analyze.cpp | |
parent | 6b3f41ed88e8e440e11a4fbf20b6600529f80049 (diff) |
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; |