summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/thread-specifier.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGen/thread-specifier.c
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/CodeGen/thread-specifier.c')
-rw-r--r--test/CodeGen/thread-specifier.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/thread-specifier.c b/test/CodeGen/thread-specifier.c
index a1f3e16..a2d3e62 100644
--- a/test/CodeGen/thread-specifier.c
+++ b/test/CodeGen/thread-specifier.c
@@ -3,7 +3,13 @@
// CHECK: @b = external thread_local global
// CHECK: @d.e = internal thread_local global
// CHECK: @d.f = internal thread_local global
+// CHECK: @f.a = internal thread_local(initialexec) global
// CHECK: @a = thread_local global
+// CHECK: @g = thread_local global
+// CHECK: @h = thread_local(localdynamic) global
+// CHECK: @i = thread_local(initialexec) global
+// CHECK: @j = thread_local(localexec) global
+
__thread int a;
extern __thread int b;
int c() { return *&b; }
@@ -13,3 +19,12 @@ int d() {
return 0;
}
+__thread int g __attribute__((tls_model("global-dynamic")));
+__thread int h __attribute__((tls_model("local-dynamic")));
+__thread int i __attribute__((tls_model("initial-exec")));
+__thread int j __attribute__((tls_model("local-exec")));
+
+int f() {
+ __thread static int a __attribute__((tls_model("initial-exec")));
+ return a++;
+}
OpenPOWER on IntegriCloud