On Fri, Jan 4, 2013 at 9:33 PM, Eric Christopher <[email protected]> wrote:
> > > On Fri, Jan 4, 2013 at 1:45 PM, Robinson, Paul > <[email protected]>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
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
