]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: initialize tu_stats fields
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 25 Feb 2025 21:29:06 +0000 (16:29 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 26 Feb 2025 03:20:43 +0000 (22:20 -0500)
Initialize fields of tu_stats to 0, remove the explicit default
initialization of dwarf2_per_bfd::tu_stats.

Change-Id: I98b2d5c4171291a3df2569466559174fb7cf32b6
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/read.h

index 0938dacc73c34035ad1c79ea394734f8ee0fa449..a7313a6e8ca9c27ef4b886a535b303b861df54bd 100644 (file)
@@ -38,12 +38,12 @@ extern struct cmd_list_element *show_dwarf_cmdlist;
 
 struct tu_stats
 {
-  int nr_uniq_abbrev_tables;
-  int nr_symtabs;
-  int nr_symtab_sharers;
-  int nr_stmt_less_type_units;
-  int nr_all_type_units_reallocs;
-  int nr_tus;
+  int nr_uniq_abbrev_tables = 0;
+  int nr_symtabs = 0;
+  int nr_symtab_sharers = 0;
+  int nr_stmt_less_type_units = 0;
+  int nr_all_type_units_reallocs = 0;
+  int nr_tus = 0;
 };
 
 struct dwarf2_cu;
@@ -529,7 +529,7 @@ public:
 
   /* Type unit statistics, to see how well the scaling improvements
      are doing.  */
-  struct tu_stats tu_stats {};
+  struct tu_stats tu_stats;
 
   /* A table mapping DW_AT_dwo_name values to struct dwo_file objects.
      This is NULL if the table hasn't been allocated yet.  */