[PATCH] D24362: Pass CVRecords through visitors as non-const references

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 13:01:06 PDT 2016


zturner created this revision.
zturner added reviewers: rnk, amccarth.
zturner added a subscriber: llvm-commits.

This simplifies a lot of code, and will actually be necessary for an upcoming patch to add a hash calcluation visitor.

The idea before was that visitors should be examining records, not modifying them.  But this is no longer true with a visitor which constructs a `CVRecord` from a yaml description.  To handle this until now, we were doing some fixup on the CVRecord objects at a higher level, but it makes a lot more sense to just have the visitor fill out the fields of the `CVRecord` directly.  In doing so I uncovered a few bugs related to `Data` and `RawData` and fixed those.

https://reviews.llvm.org/D24362

Files:
  include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
  include/llvm/DebugInfo/CodeView/FieldListSerializationVisitor.h
  include/llvm/DebugInfo/CodeView/TypeDeserializer.h
  include/llvm/DebugInfo/CodeView/TypeDumper.h
  include/llvm/DebugInfo/CodeView/TypeSerializationVisitor.h
  include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h
  include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h
  include/llvm/DebugInfo/PDB/Raw/TpiStreamBuilder.h
  lib/DebugInfo/CodeView/CVTypeVisitor.cpp
  lib/DebugInfo/CodeView/TypeDumper.cpp
  lib/DebugInfo/CodeView/TypeStreamMerger.cpp
  lib/DebugInfo/CodeView/TypeTableBuilder.cpp
  lib/DebugInfo/PDB/Raw/TpiStream.cpp
  tools/llvm-pdbdump/CodeViewYaml.cpp
  tools/llvm-pdbdump/CodeViewYaml.h
  tools/llvm-pdbdump/PdbYaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24362.70744.patch
Type: text/x-patch
Size: 39866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/0c00e249/attachment.bin>


More information about the llvm-commits mailing list