[patch] Use alias linkage and visibility to decide tls access mode
Rafael EspĂndola
rafael.espindola at gmail.com
Fri May 23 10:39:20 PDT 2014
This matches both what we do for the non-thread case and what gcc does.
I found this while looking a the possibility of having a GlobalAlias
with an aliasee that is an arbitrary ConstantExpr, and therefore with
no notion of "aliased global".
With this patch clang would match gcc's behaviour in
static __thread int a = 42;
extern __thread int b __attribute__((alias("a")));
int *f(void) { return &a; }
int *g(void) { return &b; }
if not for pr19843. Manually writing the IL does produce the same access modes.
It is also a step in the direction of fixing pr19844.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tls.patch
Type: application/octet-stream
Size: 2870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140523/34e003c5/attachment.obj>
More information about the llvm-commits
mailing list