[PATCH] D32928: [CodeView] Allow random access visitation of type records
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 17:01:14 PDT 2017
zturner created this revision.
In preparation for providing random access visitation of type streams, we need some plumbing that allows the vistation infrastructure to pass type indices through the pipeline.
This patches takes the simplest possible approach. No existing interfaces are changed, but there is now an additional overload of `CVTypeVisitor::visitTypeRecord` which takes a `TypeIndex`. When this overload is called, instead of invoking the normal `visitTypeBegin(CVType&)` method on the callback interface it invokes a new callback `visitTypeBegin(CVType&,TypeIndex)`.
To demonstrate how this is useful, a new implementation of `TypeDatabase` is introduced which allows random insertion and access of type records, and the `TypeDatabaseVisitor` is taught to be able to add records to either a `TypeDatabase` or a `RandomAccessTypeDatabase`, depending on how the visitor is constructed.
https://reviews.llvm.org/D32928
Files:
llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
llvm/include/llvm/DebugInfo/CodeView/TypeDatabase.h
llvm/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h
llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h
llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h
llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
llvm/lib/DebugInfo/CodeView/TypeDatabase.cpp
llvm/lib/DebugInfo/CodeView/TypeDatabaseVisitor.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32928.98041.patch
Type: text/x-patch
Size: 17376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170506/268bb418/attachment-0001.bin>
More information about the llvm-commits
mailing list