================
@@ -402,6 +420,36 @@ bool DebugNamesDWARFIndex::SameParentChain(
return true;
}
+bool DebugNamesDWARFIndex::WithinParentChain(
+ llvm::ArrayRef<llvm::StringRef> query_parent_names,
+ llvm::ArrayRef<DebugNames::Entry> parent_chain) const {
+ if (parent_chain.size() < query_parent_names.size())
+ return false;
+
+ size_t query_idx = 0, chain_idx = 0;
+ while (query_idx < query_parent_names.size() &&
+ chain_idx < parent_chain.size()) {
+ if (SameAsEntryATName(query_parent_names[query_idx],
+ parent_chain[chain_idx])) {
+ ++query_idx;
+ ++chain_idx;
+ } else {
+ // Name does not match, try next parent_chain entry if the current entry
+ // is namespace because the current one can be an inline namespace.
----------------
jeffreytan81 wrote:
The design is made to perform as much filtering as possible in
`DebugNamesDWARFIndex::GetTypesWithQuery()`, it does not have to be accurate,
because it will eventually delegate to base class
`DWARFIndex::ProcessTypeDieMatchQuery()` which performs accurate semantics as
the original callsite.
https://github.com/llvm/llvm-project/pull/108907
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits