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

Eric Christopher echristo at gmail.com
Fri Jan 4 22:19:40 PST 2013


On Fri, Jan 4, 2013 at 9:33 PM, Eric Christopher <echristo at gmail.com> wrote:

>
>
> On Fri, Jan 4, 2013 at 1:45 PM, Robinson, Paul <Paul.Robinson at am.sony.com>wrote:
>
>>
>>
>>>     > b) Instead of inlining all the code for CollectRecordStaticVars
>>> how about outlining it into a couple of static functions?
>>>
>>>  Hmm, yeah the body of that loop is basically "if static-member do
>>> this; else if field do that;" so factoring out those bits seems
>>> reasonable.  (The lambda part, which I didn't touch, probably also could be
>>> factored out for similar reasons, but that might exceed the scope of what
>>> I'm doing with this patch.  Let me know.)
>>>
>>>
>>
>>  > Yes please, thanks.
>>
>> It turns out to be infeasible to make these static functions, because
>> they use private data and methods from class CGDebugInfo.  Do you want me
>> to do the outlining as new private methods, or just leave everything inline
>> within CollectRecordFields?  I will say that the refactoring does make
>> things look cleaner.
>>
>>
> New private methods will be fine, thanks. :)
>
>
Also, have you thought more about checking the decl instead of the cached
type to determine if they're static member variables?

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130104/c79de1f2/attachment.html>


More information about the cfe-commits mailing list