summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/threadsafe-statics.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-04-27 04:37:08 +0000
committerAnders Carlsson <andersca@mac.com>2011-04-27 04:37:08 +0000
commit173d51286bcaff4b6b76eebf6542d3b1311142e2 (patch)
tree0f72736dee5c39d574285ef3a8d60d3d5c026771 /test/CodeGenCXX/threadsafe-statics.cpp
parent6add6fbc5997c42fb014969b68770b1b29aa318b (diff)
When compiling with -fno-threadsafe-statics, guard variables for globals with internal linkage don't have to be i64, i8 works just fine!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/threadsafe-statics.cpp')
-rw-r--r--test/CodeGenCXX/threadsafe-statics.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CodeGenCXX/threadsafe-statics.cpp b/test/CodeGenCXX/threadsafe-statics.cpp
index 65ebc43c5d..8afc2746f4 100644
--- a/test/CodeGenCXX/threadsafe-statics.cpp
+++ b/test/CodeGenCXX/threadsafe-statics.cpp
@@ -1,8 +1,11 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix=WITH-TSS %s
-// RUN: %clang_cc1 -emit-llvm -o - %s -fno-threadsafe-statics | FileCheck -check-prefix=NO-TSS %s
+// RUN: %clang_cc1 -emit-llvm -triple=x86_64-apple-darwin10 -o - %s | FileCheck -check-prefix=WITH-TSS %s
+// RUN: %clang_cc1 -emit-llvm -triple=x86_64-apple-darwin10 -o - %s -fno-threadsafe-statics | FileCheck -check-prefix=NO-TSS %s
int f();
+// WITH-TSS: @_ZZ1gvE1a = internal global i32 0, align 4
+// WITH-TSS: @_ZGVZ1gvE1a = internal global i64 0
+
// WITH-TSS: define void @_Z1gv() nounwind
// WITH-TSS: call i32 @__cxa_guard_acquire
// WITH-TSS: call void @__cxa_guard_release
@@ -11,6 +14,9 @@ void g() {
static int a = f();
}
+// NO-TSS: @_ZZ1gvE1a = internal global i32 0, align 4
+// NO-TSS: @_ZGVZ1gvE1a = internal global i8 0
+
// NO-TSS: define void @_Z1gv() nounwind
// NO-TSS-NOT: call i32 @__cxa_guard_acquire
// NO-TSS-NOT: call void @__cxa_guard_release