]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: remove unnecessary local variable in dw2_get_file_names_reader
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 5 Mar 2025 05:06:36 +0000 (00:06 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 5 Mar 2025 16:58:31 +0000 (11:58 -0500)
It seems like the lh_cu variable is not necessary, we can just use
this_cu.

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

index bacec23af3ee21ac695f5139744f2193a0771884..3a4e350e7bbbfd034d0dad82f0ddb8f8ded7e09a 100644 (file)
@@ -1865,7 +1865,6 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
   if (comp_unit_die->tag == DW_TAG_partial_unit)
     return;
 
-  dwarf2_per_cu *lh_cu = this_cu;
   slot = NULL;
 
   line_header_up lh;
@@ -1888,7 +1887,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
                             &find_entry, INSERT);
       if (*slot != NULL)
        {
-         lh_cu->file_names = (struct quick_file_names *) *slot;
+         this_cu->file_names = (struct quick_file_names *) *slot;
          return;
        }
 
@@ -1938,7 +1937,7 @@ dw2_get_file_names_reader (const struct die_reader_specs *reader,
 
   qfn->real_names = NULL;
 
-  lh_cu->file_names = qfn;
+  this_cu->file_names = qfn;
 }
 
 /* A helper for the "quick" functions which attempts to read the line