diff options
author | Pavel Labath <labath@google.com> | 2018-05-18 14:15:46 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-05-18 14:15:46 +0000 |
commit | 1237095b3c973e6e7d8a0cc5c27ee439507caa49 (patch) | |
tree | d906ea47486ead54665525567be320ad1ea74a42 /clang/lib/Tooling/Core/HeaderIncludes.cpp | |
parent | c4b8d367a8bc9bf39fb0c8ebf08ce7e3f53aa9d3 (diff) | |
download | bcm5719-llvm-1237095b3c973e6e7d8a0cc5c27ee439507caa49.tar.gz bcm5719-llvm-1237095b3c973e6e7d8a0cc5c27ee439507caa49.zip |
[DWARF] Extract indexing code into a separate class hierarchy
Summary:
This places the `if(m_using_apple_tables)` branches inside the
SymbolFileDWARF class behind an abstract DWARFIndex class. The class
currently has two implementations:
- AppleIndex, which searches using .apple_names and friends
- ManualIndex, which searches using a manually built index
Most of the methods of the class are very simple, and simply extract the
list of DIEs for the given name from the appropriate sub-table. The main
exception are the two GetFunctions overloads, which take a couple of
extra paramenters, including some callbacks. It was not possible to
split these up the same way as other methods, as here we were doing a
lot of post-processing on the results. The post-processing is similar
for the two cases, but not identical. I hope to factor these further in
separate patches.
Other interesting methods are:
- Preload(): do any preprocessing to make lookups faster (noop for
AppleIndex, forces a build of the lookup tables for ManualIndex).
- ReportInvalidDIEOffset(): Used to notify the users of an invalid index
(prints a message for AppleIndex, noop for ManualIndex).
- Dump(): dumps the index state (noop for AppleIndex, prints the lookup
tables for ManualIndex).
Reviewers: clayborg, JDevlieghere
Subscribers: mgorny, aprantl, lldb-commits
Differential Revision: https://reviews.llvm.org/D46889
llvm-svn: 332719
Diffstat (limited to 'clang/lib/Tooling/Core/HeaderIncludes.cpp')
0 files changed, 0 insertions, 0 deletions