]> granicus.if.org Git - clang/commitdiff
FileCheckize.
authorEric Christopher <echristo@apple.com>
Thu, 2 Dec 2010 02:30:43 +0000 (02:30 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 2 Dec 2010 02:30:43 +0000 (02:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120648 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/thread-specifier.c

index a16103f08f6d4335fa8d655f36de05cd1bc2f894..a1f3e168000e694d5fdea6653e7e92884d057957 100644 (file)
@@ -1,11 +1,15 @@
-// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | grep thread_local | count 4
-// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | not grep common
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
+// CHECK: @b = external thread_local global
+// CHECK: @d.e = internal thread_local global
+// CHECK: @d.f = internal thread_local global
+// CHECK: @a = thread_local global
 __thread int a;
 extern __thread int b;
-int c() { return &b; }
+int c() { return *&b; }
 int d() {
   __thread static int e;
   __thread static union {float a; int b;} f = {.b = 1};
+  return 0;
 }