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

Eric Christopher echristo at gmail.com
Wed Jan 2 18:52:32 PST 2013


Hi Paul,

I think this is going to be OK. I've got a couple comments though:

-                          layout.getFieldOffset(fieldNo), tunit, RecordTy);
+                          layout.getFieldOffset(fieldNo - 1), tunit,
RecordTy);

a) There are a few other places that use fieldNo and since you're not
updating them it'd be nice to have some comments.
b) Instead of inlining all the code for CollectRecordStaticVars how about
outlining it into a couple of static functions?
c) Will this handle something like this:

class A {
  static int a;
};

A a;

where the variable A::a isn't defined in the file (but likely is somewhere
else).

-eric



On Wed, Jan 2, 2013 at 1:32 PM, Robinson, Paul <Paul.Robinson at am.sony.com>wrote:

> Ping w/ updated patch & directly cc Eric.
> Also should fix PR14734.  Added a debuginfo-test.
> --paulr
>
> ________________________________________
> From: cfe-commits-bounces at cs.uiuc.edu [cfe-commits-bounces at cs.uiuc.edu]
> on behalf of Robinson, Paul [Paul.Robinson at am.sony.com]
> Sent: Tuesday, December 18, 2012 12:10 PM
> To: cfe-commits at cs.uiuc.edu
> Subject: [cfe-commits] [PATCH] PR14471: Debug info for static data members
>      (Clang part)
>
> Collect both normal and static data members of a class in source
> order.  Describe static data members to the metadata using the new
> LLVM interfaces.
>
> Clang part of the fix for PR14471.
> --paulr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130102/044c79c7/attachment.html>


More information about the cfe-commits mailing list