Partly rewrite dwarf2_get_symbol_read_needs

This patch partly rewries dwarf2_get_symbol_read_needs.  The goal is
to simplify it and perhaps make it a little more efficient.

With this patch, if an operation simply continues to the next
operation in the expression, then no manipulation of ops_to_visit is
needed.  This avoids excess pushes and pops.

Also, visited_ops is changed to be a std::vector<bool> rather than a
map.

Regression tested on x86-64 Fedora 41.



1 file changed