This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Lazy allocation of DECL_ASSEMBLER_NAME



I will try to look into it, but last time I tried to do so, both C and
C++ frontends was creating separate declarations for local declarations,


If so, those are bugs -- or cases where the front ends really wants you to think of those as seaparate objects.

forward declarations and such, so single function got many DECLs.
Also we can't hash directly the addresses as the hashtable is saved into
PCH headers, so I am unsure about better sollution to the hashing.
I need at least one entity that is stable across PCH and multiple
declarations...


Use DECL_UID.

But, really, someone should just fix PCH to do the obvious pointer swizzling and/or hash-table rebuilds. It's silly to be inventing new uniquifiers, computing them, filling up memory with them, etc., in lots of places when we could just fix the PCH machinery.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]