[PATCH] D56802: [CodeGenObjC] Treat ivar offsets variables as constant if they refer to ivars of a direct subclass of NSObject with an @implementation
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 16 14:41:47 PST 2019
dexonsmith added a comment.
In D56802#1360316 <https://reviews.llvm.org/D56802#1360316>, @rjmccall wrote:
> We've tossed around the idea of doing things like this before, but I was hoping that it wouldn't have to be specific to `NSObject` and that we'd e.g. have an attribute that guarantees that the `@interface` declares all the ivars for a class. Are we still thinking that?
The attribute idea hasn't yet survived language discussions (too much of an ABI foot-gun for library evolution). But it's safe to move forward with something `NSObject`-specific since it's already baked into the ABI.
> Even if this is just a step towards that, I think we should at least add a method to answer whether we have a statically-known layout for the class, rather than hard-coding that decision at the leaves like this.
A method makes sense to me too.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56802/new/
https://reviews.llvm.org/D56802
More information about the cfe-commits
mailing list