PATCH: private ivars
Adrian Prantl
aprantl at apple.com
Tue Feb 19 10:35:03 PST 2013
On Feb 18, 2013, at 4:45 PM, jahanian <fjahanian at apple.com> wrote:
> I don't see how data().IvarList is updated for class extensions. This is the scenario I am thinking.
>
> 1) all_declared_ivar_begin is called when only primary class is seen ( there are yet not class extensions).
> so data().IvarLis is updated to hold list of ivars in primary class.
>
> 2) Then a class extensions is declared and whose debug info. is needed. So, all_declared_ivar_begin is called
> again. This time, however, data().IvarList is non-empty and you don't go through list of ivars in class
> extensions to add them to data().IvarList.
The reason why this works is that ObjCIvarDecl::Create() invalidates the ivar cache every time a new ivar is declared (in an extension). I commented this behavior in the revision attached to my other mail.
-- adrian
More information about the cfe-commits
mailing list