https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124200

--- Comment #14 from Thomas Berger <loki at loki dot codes> ---
(In reply to Nathaniel Shead from comment #7)
> I don't think relying on DECL_UID for member ordering will be easy unless we
> somehow stream them independently as well and then remap the relevant UIDs
> in modules (but this will then also probably break things because modules
> uses DECL_UID as the key for various lookup maps).

I thought a while about this, how about we stream the origin DECL_UID for
example in tree_decl_common::abstract_origin, as far as i can see it, for
relevant types, it should be empty (maybe there are some checks on
empty/nonempty i didn't validate that right yet).

We could guard this behind -freflection, to avoid streaming the original UIDs
back in, and it would allow for a consisted ordering with to much overhead, as
the same rules as for local decls apply with the differences that a difference
field is used for ordering.

Reply via email to