[1/8] gdb/dwarf: remove unnecessary local variable in dw2_get_file_names_reader
Checks
Commit Message
From: Simon Marchi <simon.marchi@efficios.com>
It seems like the lh_cu variable is not necessary, we can just use
this_cu.
Change-Id: Ic2ed6ee82faf1fb5d340cd92dc8ef15434b20cb8
---
gdb/dwarf2/read.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
base-commit: aa2cd0e39dc81b28ba7c934faac18bd4d8287450
Comments
>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:
Simon> From: Simon Marchi <simon.marchi@efficios.com>
Simon> It seems like the lh_cu variable is not necessary, we can just use
Simon> this_cu.
Thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
On 3/5/25 10:29 AM, Tom Tromey wrote:
>>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> From: Simon Marchi <simon.marchi@efficios.com>
> Simon> It seems like the lh_cu variable is not necessary, we can just use
> Simon> this_cu.
>
> Thanks.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
Thanks for the review, I pushed the series.
Simon
@@ -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