Files
clang-p2996/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
jeffreytan81 cb04d33780 Improve namespace lookup using .debug_names parent chain (#110062)
## Summary
This PR is a continuation of
https://github.com/llvm/llvm-project/pull/108907 by using `.debug_names`
parent chain faster lookup for namespaces.


## Implementation
Similar to https://github.com/llvm/llvm-project/pull/108907. This PR
adds a new API: `GetNamespacesWithParents` in `DWARFIndex` base class.
The API performs the same function as `GetNamespaces()` with additional
filtering using parents `CompilerDeclContext`. A default implementation
is given in `DWARFIndex` class which parses debug info and performs the
matching. In the `DebugNameDWARFIndex` override, parents
`CompilerDeclContext` is cross checked with parent chain in
`.debug_names` for much faster filtering before fallback to base
implementation for final filtering.

## Performance Results
For the same benchmark used in
https://github.com/llvm/llvm-project/pull/108907, this PR improves: 48s
=> 28s

---------

Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
2024-10-29 20:42:54 -07:00

24 KiB