@@ -368,9 +368,10 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType(
368368 continue ;
369369 }
370370
371- if (SameParentChain (parent_names, *parent_chain) &&
372- !ProcessEntry (entry, callback))
373- return ;
371+ if (SameParentChain (parent_names, *parent_chain)) {
372+ if (!ProcessEntry (entry, callback))
373+ return ;
374+ }
374375 }
375376 m_fallback.GetFullyQualifiedType (context, callback);
376377}
@@ -554,13 +555,15 @@ void DebugNamesDWARFIndex::GetTypesWithQuery(
554555 continue ;
555556 }
556557
557- if (WithinParentChain (parent_contexts, *parent_chain) &&
558- !ProcessEntry (entry, [&](DWARFDIE die) {
559- // After .debug_names filtering still sending to base class for
560- // further filtering before calling the callback.
561- return ProcessTypeDIEMatchQuery (query, die, callback);
562- }))
563- return ;
558+ if (WithinParentChain (parent_contexts, *parent_chain)) {
559+ if (!ProcessEntry (entry, [&](DWARFDIE die) {
560+ // After .debug_names filtering still sending to base class for
561+ // further filtering before calling the callback.
562+ return ProcessTypeDIEMatchQuery (query, die, callback);
563+ }))
564+ // If the callback returns false, we're done.
565+ return ;
566+ }
564567 }
565568 m_fallback.GetTypesWithQuery (query, callback);
566569}
@@ -570,9 +573,6 @@ void DebugNamesDWARFIndex::GetNamespacesWithParents(
570573 llvm::function_ref<bool (DWARFDIE die)> callback) {
571574 std::vector<lldb_private::CompilerContext> parent_contexts =
572575 parent_decl_ctx.GetCompilerContext ();
573- if (parent_contexts.empty ())
574- return GetNamespaces (name, callback);
575-
576576 llvm::SmallVector<CompilerContext> parent_named_contexts;
577577 std::copy_if (parent_contexts.rbegin (), parent_contexts.rend (),
578578 std::back_inserter (parent_named_contexts),
@@ -594,14 +594,16 @@ void DebugNamesDWARFIndex::GetNamespacesWithParents(
594594 continue ;
595595 }
596596
597- if (WithinParentChain (parent_named_contexts, *parent_chain) &&
598- !ProcessEntry (entry, [&](DWARFDIE die) {
599- // After .debug_names filtering still sending to base class for
600- // further filtering before calling the callback.
601- return ProcessNamespaceDieMatchParents (parent_decl_ctx, die,
602- callback);
603- }))
604- return ;
597+ if (WithinParentChain (parent_named_contexts, *parent_chain)) {
598+ if (!ProcessEntry (entry, [&](DWARFDIE die) {
599+ // After .debug_names filtering still sending to base class for
600+ // further filtering before calling the callback.
601+ return ProcessNamespaceDieMatchParents (parent_decl_ctx, die,
602+ callback);
603+ }))
604+ // If the callback returns false, we're done.
605+ return ;
606+ }
605607 }
606608 }
607609 m_fallback.GetNamespacesWithParents (name, parent_decl_ctx, callback);
0 commit comments