On May 5, 2014, at 16:46 , David Blaikie <[email protected]> wrote:

> On Mon, May 5, 2014 at 4:38 PM, Jordan Rose <[email protected]> wrote:
>> @interface is a definition of an ObjC class, but it doesn't contain all the 
>> ivars. @implementation can also contain ivars, but it's not in the 
>> redeclaration chain for the @interface/@class. Is this going to mess things 
>> up at all?
> 
> If the @implementation isn't in the redeclaration chain of the
> @interface, then I'm not sure how those two entities would be related
> in the debug info... but a cursory test (a simple @implementation
> placed at the end of the test case, containing a single @public int)
> does cause the debug info to have that member variable included in the
> debug info...
> 
> Is that the sort of case you were concerned about?

I guess so. I don't know enough about debug info generation to know what's 
important here, but this section scared me:

> A side benefit is that we also don't need the CompletedTypeCache
> anymore. Just rely on the declaration-ness of a type to decide whether
> its definition is yet to be emitted.

...since an ObjCInterfaceDecl is considered a definition long before we may 
have seen all the ivars. (In fact, you can only be sure you've seen all the 
ivars if the TU has an @implementation in it.)

Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to