@@ -329,7 +329,7 @@ getParentChain(Entry entry,
329329
330330void DebugNamesDWARFIndex::GetFullyQualifiedType (
331331 const DWARFDeclContext &context,
332- llvm::function_ref<bool (DWARFDIE die)> callback) {
332+ llvm::function_ref<IterationAction (DWARFDIE die)> callback) {
333333 if (context.GetSize () == 0 )
334334 return ;
335335
@@ -358,15 +358,16 @@ void DebugNamesDWARFIndex::GetFullyQualifiedType(
358358
359359 if (!parent_chain) {
360360 // Fallback: use the base class implementation.
361- if (!ProcessEntry (entry, [&](DWARFDIE die) {
362- return GetFullyQualifiedTypeImpl (context, die, callback);
363- }))
361+ if (!ProcessEntry (entry, IterationActionAdaptor ([&](DWARFDIE die) {
362+ return GetFullyQualifiedTypeImpl (context, die,
363+ callback);
364+ })))
364365 return ;
365366 continue ;
366367 }
367368
368369 if (SameParentChain (parent_names, *parent_chain)) {
369- if (!ProcessEntry (entry, callback))
370+ if (!ProcessEntry (entry, IterationActionAdaptor ( callback) ))
370371 return ;
371372 }
372373 }
@@ -456,11 +457,12 @@ bool DebugNamesDWARFIndex::WithinParentChain(
456457}
457458
458459void DebugNamesDWARFIndex::GetTypes (
459- ConstString name, llvm::function_ref<bool (DWARFDIE die)> callback) {
460+ ConstString name,
461+ llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
460462 for (const DebugNames::Entry &entry :
461463 m_debug_names_up->equal_range (name.GetStringRef ())) {
462464 if (isType (entry.tag ())) {
463- if (!ProcessEntry (entry, callback))
465+ if (!ProcessEntry (entry, IterationActionAdaptor ( callback) ))
464466 return ;
465467 }
466468 }
@@ -470,11 +472,11 @@ void DebugNamesDWARFIndex::GetTypes(
470472
471473void DebugNamesDWARFIndex::GetTypes (
472474 const DWARFDeclContext &context,
473- llvm::function_ref<bool (DWARFDIE die)> callback) {
475+ llvm::function_ref<IterationAction (DWARFDIE die)> callback) {
474476 auto name = context[0 ].name ;
475477 for (const DebugNames::Entry &entry : m_debug_names_up->equal_range (name)) {
476478 if (entry.tag () == context[0 ].tag ) {
477- if (!ProcessEntry (entry, callback))
479+ if (!ProcessEntry (entry, IterationActionAdaptor ( callback) ))
478480 return ;
479481 }
480482 }
@@ -521,7 +523,8 @@ DebugNamesDWARFIndex::GetTypeQueryParentContexts(TypeQuery &query) {
521523}
522524
523525void DebugNamesDWARFIndex::GetTypesWithQuery (
524- TypeQuery &query, llvm::function_ref<bool (DWARFDIE die)> callback) {
526+ TypeQuery &query,
527+ llvm::function_ref<IterationAction(DWARFDIE die)> callback) {
525528 ConstString name = query.GetTypeBasename ();
526529 std::vector<lldb_private::CompilerContext> query_context =
527530 query.GetContextRef ();
@@ -546,19 +549,20 @@ void DebugNamesDWARFIndex::GetTypesWithQuery(
546549 getParentChain (entry);
547550 if (!parent_chain) {
548551 // Fallback: use the base class implementation.
549- if (!ProcessEntry (entry, [&](DWARFDIE die) {
550- return ProcessTypeDIEMatchQuery (query, die, callback);
551- } ))
552+ if (!ProcessEntry (entry, IterationActionAdaptor ( [&](DWARFDIE die) {
553+ return ProcessTypeDIEMatchQuery (query, die, callback);
554+ }) ))
552555 return ;
553556 continue ;
554557 }
555558
556559 if (WithinParentChain (parent_contexts, *parent_chain)) {
557- if (!ProcessEntry (entry, [&](DWARFDIE die) {
558- // After .debug_names filtering still sending to base class for
559- // further filtering before calling the callback.
560- return ProcessTypeDIEMatchQuery (query, die, callback);
561- }))
560+ if (!ProcessEntry (entry, IterationActionAdaptor ([&](DWARFDIE die) {
561+ // After .debug_names filtering still sending to base
562+ // class for further filtering before calling the
563+ // callback.
564+ return ProcessTypeDIEMatchQuery (query, die, callback);
565+ })))
562566 // If the callback returns false, we're done.
563567 return ;
564568 }
0 commit comments