[PATCH] clang does not emit DW_TAG_enumerator and DW_TAG_enumeration_type for unnamed enum types

David Blaikie dblaikie at gmail.com
Mon Dec 2 08:34:27 PST 2013


On Fri, Nov 29, 2013 at 7:01 AM, jyoti allur
<jyoti.yalamanchili at gmail.com> wrote:
>
>   Hi David,
>   Yes, unfortunately this patch emits all enumerations, even those that are not referenced. Currently DeferredDecls in CodeGenModule class seem to add only named decls. We could limit this debug info for  DW_TAG_enumerator and DW_TAG_enumeration_type for unnamed decls for FullDebugInfo mode only ?

I'd rather find a way to fix this even in -flimit-debug-info mode -
because it'll still be a bug/confusing to get different behavior based
on named/unnamed-ness of a type...

but I haven't had time to look around and see how we might achieve
that. Perhaps there's some other hook or data structure we can use to
find these decls (where/how do enums end up in DeferredDecls - if we
look around there can we find an entry point that handles both named
and unnamed equally)

do issues like this affect unnamed types of other kinds
(struct/class/union) too? I assume not, but just asking/checkin.




More information about the cfe-commits mailing list