This is the mail archive of the 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: [PATCH] Emit DW_AT_enum_class attribute for C++0x scoped enums

On 04/16/2010 10:45 AM, Jakub Jelinek wrote:
On Fri, Apr 16, 2010 at 04:31:34PM +0200, Richard Guenther wrote:

Ugh. I hate to add a langhook for this as it won't ever work with LTO. Can you instead recycle some generic tree bit?

I don't believe this is common enough thing to waste a generic tree bit on it right now. There aren't enough bits for all kinds of things the DWARF producer needs to know.

I agree. Debugging information is necessarily highly language-specific, there needs to be some direct communication between the language front end and debugging back end unless we clutter the language-independent representation with lots of stuff that is only relevant to debugging. I don't want to get into representing template parameters in the middle end...

There are various possible approaches IMHO:
1) let the original FE through lang hooks dump that stuff into debug info
    and LTO FE then read that debug info and build its own DECL_LANG_SPECIFIC
    and TYPE_LANG_SPECIFIC to be able to answer the lang hooks
2) let the LTO streamer call the langhooks and stream the info in LTO
    format to be streamed back into LTO's TYPE_LANG_SPECIFIC/DECL_LANG_SPECIFIC
but IMHO it is better to make the bits all appear together just for LTO,
otherwise we needlessly increase memory consumption for stuff that in pure
C or pure C++ or pure Fortran won't ever appear together.

I thought the plan was to generate the debug info ahead of time and then include it in the LTO output.

The patch looks fine to me.


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