[llvm-commits] [PATCH] PR14471: Debug info for static data members (LLVM part)

Robinson, Paul Paul.Robinson at am.sony.com
Mon Jan 7 15:49:45 PST 2013


> So, I haven't checked with your patches since you think you might be
> missing a couple of hunks, 

The previous patch was missing stuff.
I was about to send a new one when I saw your emails.

> however I think that we can still make do
> this using createMemberType and merely having a flag for the type that
> says that it's a static type and then query that. You wouldn't even
> need to modify createMemberType to take any extra variables it could
> just check for a new flag on the member.

Hmm, createMemberType would need one more parameter to handle the
optional constant value on a static member, which means all members
would have metadata padded by one more element.  So I would still
have a separate createStaticMemberType, to avoid that cost (to all
the tests if nothing else).  Overloading static members onto 
DIDerivedType is also feasible, using a flag to distinguish, although
I'm not certain you'll be happier with the results!
I'll take a crack at this and see how it goes.

> Also, yes, the fixme in createStaticMemberDIE is correct - it should be DW_TAG_member.

I was hesitant because I know older GDBs don't like it, but I'm happy
to use the correct tag here.

> Also:
>
> +  DIDescriptor GVContext = GV.getContext();
> +  (void)getOrCreateContextDIE(GVContext);
>
> this seems weird (that, as in, getting rid of the return value)?

Guaranteeing there's a context DIE, but not needing a handle to it.
I can take out the (void).

> As a note, I'm pretty happy with the patch, just trying to minimize the amount of large scale changes.

Thanks.  Like I said I'll have another go, probably post it tomorrow at this rate.
--paulr




More information about the llvm-commits mailing list