@@ -2502,32 +2502,29 @@ size_t SymbolFileDWARF::FindTypes(const std::vector<CompilerContext> &context,
2502
2502
m_index->GetTypes (name, die_offsets);
2503
2503
const size_t num_die_matches = die_offsets.size ();
2504
2504
2505
- if (num_die_matches) {
2506
- size_t num_matches = 0 ;
2507
- for (size_t i = 0 ; i < num_die_matches; ++i) {
2508
- const DIERef &die_ref = die_offsets[i];
2509
- DWARFDIE die = GetDIE (die_ref);
2510
-
2511
- if (die) {
2512
- std::vector<CompilerContext> die_context;
2513
- die.GetDeclContext (die_context);
2514
- if (die_context != context)
2515
- continue ;
2505
+ size_t num_matches = 0 ;
2506
+ for (size_t i = 0 ; i < num_die_matches; ++i) {
2507
+ const DIERef &die_ref = die_offsets[i];
2508
+ DWARFDIE die = GetDIE (die_ref);
2509
+
2510
+ if (die) {
2511
+ std::vector<CompilerContext> die_context;
2512
+ die.GetDeclContext (die_context);
2513
+ if (die_context != context)
2514
+ continue ;
2516
2515
2517
- Type *matching_type = ResolveType (die, true , true );
2518
- if (matching_type) {
2519
- // We found a type pointer, now find the shared pointer form our type
2520
- // list
2521
- types.InsertUnique (matching_type->shared_from_this ());
2522
- ++num_matches;
2523
- }
2524
- } else {
2525
- m_index->ReportInvalidDIERef (die_ref, name.GetStringRef ());
2516
+ Type *matching_type = ResolveType (die, true , true );
2517
+ if (matching_type) {
2518
+ // We found a type pointer, now find the shared pointer form our type
2519
+ // list
2520
+ types.InsertUnique (matching_type->shared_from_this ());
2521
+ ++num_matches;
2526
2522
}
2523
+ } else {
2524
+ m_index->ReportInvalidDIERef (die_ref, name.GetStringRef ());
2527
2525
}
2528
- return num_matches;
2529
2526
}
2530
- return 0 ;
2527
+ return num_matches ;
2531
2528
}
2532
2529
2533
2530
CompilerDeclContext
0 commit comments