[pushed,2/3] gdb/dwarf: remove unnecessary braces

Message ID 20250313023306.8480-2-simon.marchi@efficios.com
State New
Headers
Series [pushed,1/3] gdb/dwarf: use ranged for loop in some spots |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Simon Marchi March 13, 2025, 2:32 a.m. UTC
  Change-Id: I3cd6b932d0dfb4cc07b6d48a1dc9ec35e7bfa03e
---
 gdb/dwarf2/read.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
  

Patch

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index f7ebcc91e7e8..5ca3e95e61c8 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -3589,15 +3589,14 @@  build_type_psymtabs (dwarf2_per_objfile *per_objfile,
   sorted_by_abbrev.reserve (per_objfile->per_bfd->all_type_units.size ());
 
   for (const auto &cu : per_objfile->per_bfd->all_units)
-    {
-      if (cu->is_debug_types)
-	{
-	  auto sig_type = static_cast<signatured_type *> (cu.get ());
-	  sorted_by_abbrev.emplace_back
-	    (sig_type, read_abbrev_offset (per_objfile, sig_type->section,
-					   sig_type->sect_off));
-	}
-    }
+    if (cu->is_debug_types)
+      {
+	auto sig_type = static_cast<signatured_type *> (cu.get ());
+	sorted_by_abbrev.emplace_back (sig_type,
+				       read_abbrev_offset (per_objfile,
+							   sig_type->section,
+							   sig_type->sect_off));
+      }
 
   std::sort (sorted_by_abbrev.begin (), sorted_by_abbrev.end ());