Re: [PATCH v4 5/8] Remove C++ special case from process_imported_unit_die

Tom de Vries
2026-04-08T11:17:44Z

On 4/7/26 8:54 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
>
>>> Instead, because (1) this is weird and rare DWARF anyway, and (2) this
>>> is just a performance optimization, I propose removing this.
>
> Tom> I agree removing it is the right thing to do.
>
> Tom> I also feels weird to me, though the DWARF standard explicitly allows it.
>
> Tom> But from the perspective of a linux distro using gcc and lto for
> Tom> package compilation, it's the opposite of rare.
>
> Tom> Anyway, I've filed a PR to reimplement this in some form or another (
> Tom> https://sourceware.org/bugzilla/show_bug.cgi?id=33922 ).
>
> Thanks for filing that.
>
> I think the patch you posted there seems promising. I wonder if it
> could help with another case of over-eager CU expansion.

I haven't looked at the other PR, but I posted an RFC documenting the
current state of the patch.

Thanks,
- Tom