Commit e4977f9c authored by Raphael Isemann's avatar Raphael Isemann
Browse files

[lldb] Partly revert "Allow range-based for loops over DWARFDIE's children"

As pointed out in D107434 by Walter, D103172 also changed two for loops that
were actually not just iterating over some DIEs but also using the iteration
variable later on for some other things. This patch reverts the respective
faulty parts of D103172.
parent d7b0e552
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3477,7 +3477,8 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
  UniqueCStringMap<DWARFDIE> dst_name_to_die;
  UniqueCStringMap<DWARFDIE> src_name_to_die_artificial;
  UniqueCStringMap<DWARFDIE> dst_name_to_die_artificial;
  for (DWARFDIE src_die : src_class_die.children()) {
  for (src_die = src_class_die.GetFirstChild(); src_die.IsValid();
       src_die = src_die.GetSibling()) {
    if (src_die.Tag() == DW_TAG_subprogram) {
      // Make sure this is a declaration and not a concrete instance by looking
      // for DW_AT_declaration set to 1. Sometimes concrete function instances
@@ -3495,7 +3496,8 @@ bool DWARFASTParserClang::CopyUniqueClassMethodTypes(
      }
    }
  }
  for (DWARFDIE dst_die : dst_class_die.children()) {
  for (dst_die = dst_class_die.GetFirstChild(); dst_die.IsValid();
       dst_die = dst_die.GetSibling()) {
    if (dst_die.Tag() == DW_TAG_subprogram) {
      // Make sure this is a declaration and not a concrete instance by looking
      // for DW_AT_declaration set to 1. Sometimes concrete function instances