]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
dwarf2dbg.c line_entry.next assert
authorAlan Modra <amodra@gmail.com>
Mon, 9 Jun 2025 03:21:01 +0000 (12:51 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 9 Jun 2025 03:21:01 +0000 (12:51 +0930)
commit02aa7e267bb640caa935469ebb05314407accb33
tree7c11de3ecf149b84507b131039896f947b7723cd
parent7e34612049b7c681260ad59dec3a8ee6a721d0df
dwarf2dbg.c line_entry.next assert

I was puzzling over how it was correct to cast what is clearly a
struct line_entry** pointer to a struct line_entry* pointer for a
few moments, and was going to write a comment but then decided we
really don't require the "next" pointer to be where it is.  Replace
the assert with an inline function that does any necessary pointer
adjustments.

* dwarf2dbg.c (line_entry.next): Delete static assertion.
(line_entry_at_tail): New inline function.
(dwarf2_gen_line_info_1, dwarf2_finish): Replace casts in
set_or_check_view arguments with line_entry_at_tail.
gas/dwarf2dbg.c