<br><br><div class="gmail_quote">On Fri, May 11, 2012 at 12:37 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jediknil@belkadan.com" target="_blank">jediknil@belkadan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On May 10, 2012, at 18:12, Daniel Jasper wrote:<br>
<br>
> Ok, I now reuse Sema::RecordDeclSetTy.<br>
><br>
> 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.<br>
><br>
> Please find the new version attached.<br>
<br>
</div>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.)<br>
<br>
Also, it looks like Decl already has an isUsed() predicate. Are we already marking FieldDecls this way?</blockquote></div><br><div>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?</div>