r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.
jahanian
fjahanian at apple.com
Thu Mar 6 09:34:57 PST 2014
Nick +1.
On Mar 6, 2014, at 9:21 AM, jahanian <fjahanian at apple.com> wrote:
> There is functional change.
> In the test case:
>
> @interface NSObject @end
>
> @protocol P0;
>
> @interface A : NSObject <P0>
> +(Class) getClass;
> @end
>
> @implementation A
> +(Class) getClass { return self; }
> @end
>
> int main() {
> Protocol *P0 = @protocol(P0);
> return 0;
> }
>
> Before the change:
> nm -nm t.o | grep PROTOCOL
> 0000000000000078 (__DATA,__objc_const) non-external l_OBJC_CLASS_PROTOCOLS_$_A
> 0000000000000120 (__DATA,__datacoal_nt) weak private external [no dead strip] l_OBJC_PROTOCOL_$_P0
> 00000000000001c0 (__DATA,__objc_protolist) weak private external [no dead strip] l_OBJC_LABEL_PROTOCOL_$_P0
> 00000000000001c8 (__DATA,__objc_protorefs) weak private external [no dead strip] l_OBJC_PROTOCOL_REFERENCE_$_P0
>
> With current TOT clang:
>
> nm -nm t.o | grep PROTOCOL
> 0000000000000078 (__DATA,__objc_const) non-external l_OBJC_CLASS_PROTOCOLS_$_A
> 0000000000000120 (__DATA,__datacoal_nt) non-external l_OBJC_PROTOCOL_$_P0
> 00000000000001c0 (__DATA,__objc_protolist) non-external l_OBJC_LABEL_PROTOCOL_$_P0
> 00000000000001c8 (__DATA,__objc_protorefs) non-external l_OBJC_PROTOCOL_REFERENCE_$_P0
>
> - Fariborz
>
> On Mar 6, 2014, at 8:42 AM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>
>>> This is changing the linkage. Can you add comment why changing this will not change visibility of the symbol.
>>> Also, please add a test for this change.
>>
>> Sorry, I should have been more clear in the commit message. There is
>> no functionality change. We just set the linkage at construction time
>> instead of setting it afterwards with setLinkage.
>>
>> Cheers,
>> Rafael
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140306/31e8a13c/attachment.html>
More information about the cfe-commits
mailing list