On Fri, May 11, 2012 at 12:37 AM, Jordan Rose <[email protected]> wrote:
> > On May 10, 2012, at 18:12, Daniel Jasper wrote: > > > Ok, I now reuse Sema::RecordDeclSetTy. > > > > As for putting a bit into FieldDecl as opposed to the UnusedPrivateField > SetVector: It seems like FieldDecl is carefully crafted for size. Just > adding another bit for this use case doesn't seem right. > > > > Please find the new version attached. > > CachedFieldIndex is just the index of the field in the record; there's no > way that'll reach 2^31 anyway. (For comparison, C++11 [implimits] suggests > a minimum of 4096 members.) > > Also, it looks like Decl already has an isUsed() predicate. Are we already > marking FieldDecls this way? I have been looking into this some more. Marking the fields as used works fine, but I didn't find an easy way to iterate over all of the FieldDecls in a translation unit at the end. Thus, I suggest to stick with the previous version of my patch. Should also neither be a big performance nor memory impact. What do you think?
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
