From 7af96fb3afd6725a2824a0a5ca5dad34e5e0b056 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 17 May 2017 20:22:39 +0000 Subject: Vendor import of llvm trunk r303291: https://llvm.org/svn/llvm-project/llvm/trunk@303291 --- lib/DebugInfo/CodeView/TypeStreamMerger.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'lib/DebugInfo/CodeView/TypeStreamMerger.cpp') diff --git a/lib/DebugInfo/CodeView/TypeStreamMerger.cpp b/lib/DebugInfo/CodeView/TypeStreamMerger.cpp index aad20ae6dda1..51f24fa3f135 100644 --- a/lib/DebugInfo/CodeView/TypeStreamMerger.cpp +++ b/lib/DebugInfo/CodeView/TypeStreamMerger.cpp @@ -361,8 +361,7 @@ Error TypeStreamMerger::visitKnownRecord(CVType &, FieldListRecord &R) { // Visit the members inside the field list. HadUntranslatedMember = false; FieldListBuilder.begin(); - CVTypeVisitor Visitor(*this); - if (auto EC = Visitor.visitFieldListMemberStream(R.Data)) + if (auto EC = codeview::visitMemberRecordStream(R.Data, *this)) return EC; // Write the record if we translated all field list members. @@ -440,18 +439,9 @@ Error TypeStreamMerger::visitUnknownType(CVType &Rec) { Error TypeStreamMerger::mergeStream(const CVTypeArray &Types) { assert(IndexMap.empty()); - TypeVisitorCallbackPipeline Pipeline; LastError = Error::success(); - TypeDeserializer Deserializer; - Pipeline.addCallbackToPipeline(Deserializer); - Pipeline.addCallbackToPipeline(*this); - - CVTypeVisitor Visitor(Pipeline); - if (Handler) - Visitor.addTypeServerHandler(*Handler); - - if (auto EC = Visitor.visitTypeStream(Types)) + if (auto EC = codeview::visitTypeStream(Types, *this, Handler)) return EC; // If we found bad indices but no other errors, try doing another pass and see @@ -466,7 +456,8 @@ Error TypeStreamMerger::mergeStream(const CVTypeArray &Types) { IsSecondPass = true; NumBadIndices = 0; CurIndex = TypeIndex(TypeIndex::FirstNonSimpleIndex); - if (auto EC = Visitor.visitTypeStream(Types)) + + if (auto EC = codeview::visitTypeStream(Types, *this, Handler)) return EC; assert(NumBadIndices <= BadIndicesRemaining && -- cgit v1.3