Resubmit "[pdb] Change type visitor pattern to be dynamic."
There was a regression introduced during type stream merging when
visiting a field list record. This has been fixed in this patch.
llvm-svn: 272929
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index ff719b2..d798901 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -322,10 +322,9 @@
ScopedPrinter SP(CommentOS);
SP.setPrefix(CommentPrefix);
CVTD.setPrinter(&SP);
- bool DumpSuccess =
- CVTD.dump({Record.bytes_begin(), Record.bytes_end()});
- (void)DumpSuccess;
- assert(DumpSuccess && "produced malformed type record");
+ Error EC = CVTD.dump({Record.bytes_begin(), Record.bytes_end()});
+ assert(!EC && "produced malformed type record");
+ consumeError(std::move(EC));
// emitRawComment will insert its own tab and comment string before
// the first line, so strip off our first one. It also prints its own
// newline.