[codeview] Add TypeVisitorCallbackPipeline.
authorZachary Turner <zturner@google.com>
Wed, 31 Aug 2016 21:42:26 +0000 (21:42 +0000)
committerZachary Turner <zturner@google.com>
Wed, 31 Aug 2016 21:42:26 +0000 (21:42 +0000)
commit2f951ce9c9d3a0b23c5a6eff092e13b6b08b16f8
treee5e300379ab86f6fd3e6b0c126a487dbf9e5f614
parent11a235467088c800fe0a7323cb18a55fe9fe0cd3
[codeview] Add TypeVisitorCallbackPipeline.

We were kind of hacking this together before by embedding the
ability to forward requests into the TypeDeserializer.  When
we want to start adding more different kinds of visitor callback
interfaces though, this doesn't scale well and is very inflexible.

So introduce the notion of a pipeline, which itself implements
the TypeVisitorCallbacks interface, but which contains an internal
list of other callbacks to invoke in sequence.

Also update the existing uses of CVTypeVisitor to use this new
pipeline class for deserializing records before visiting them
with another visitor.

llvm-svn: 280293
llvm/include/llvm/DebugInfo/CodeView/TypeDeserializer.h
llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h [new file with mode: 0644]
llvm/lib/DebugInfo/CodeView/TypeDumper.cpp
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
llvm/tools/llvm-pdbdump/CodeViewYaml.cpp
llvm/tools/llvm-pdbdump/PdbYaml.cpp