]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/dwarf: remove nullptr prop check in dwarf2_evaluate_property
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 25 Nov 2025 04:04:30 +0000 (23:04 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 1 Dec 2025 17:39:17 +0000 (12:39 -0500)
commitdc4187ed57d6cf648aa6dc4b4fceafab0a8b1a98
treed3a0d937cfb5a9c08bdf10b2fe58d9f2fbbdc0d9
parent25902bd0baaf58ae86ac46f7d1d71f3f9ee62c1c
gdb/dwarf: remove nullptr prop check in dwarf2_evaluate_property

This nullptr is pointless most of the time: almost all callers either
check that the prop is not nullptr or they pass the address of a local
variable, which is necessarily not nullptr.  I propose to remove it.  I
found only one call site where I needed to add a check.

Change-Id: Iada84d529b8edc6b20486f3539c675dad6b364f5
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/loc.c
gdb/gdbtypes.c