[PATCH] D71219: Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 19:23:25 PST 2020
rjmccall added a comment.
In D71219#1892512 <https://reviews.llvm.org/D71219#1892512>, @steven_wu wrote:
> > I agree with all of this except that I'm not sure there's any situation where ObjC and Swift translation units should be disagreeing about the ObjC-specific parts of the OBJC_IMAGE_INFO.
>
> The lower bits of the flag is for objc info and here is the definition:
> #define OBJC_IMAGE_SUPPORTS_GC (1<<1)
> #define OBJC_IMAGE_REQUIRES_GC (1<<2)
> #define OBJC_IMAGE_OPTIMIZED_BY_DYLD (1<<3)
> #define OBJC_IMAGE_SUPPORTS_COMPACTION (1<<4)
> #define OBJC_IMAGE_IS_SIMULATED (1<<5)
> #define OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES (1<<6)
>
> The 0x40 bit is actually OBJC_IMAGE_HAS_CATEGORY_CLASS_PROPERTIES, which probably can differ from translation unit to translation unit even within ObjC. Some of the other bits should not be different. That is why I say you can break the bits down even more if needed.
Clang seems to set it unconditionally. Presumably it just controls whether category descriptors have a class-properties field; offhand, I don't know why that would need to be set globally.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71219/new/
https://reviews.llvm.org/D71219
More information about the llvm-commits
mailing list