diff options
| author | Anders Carlsson <andersca@mac.com> | 2011-04-27 04:37:08 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2011-04-27 04:37:08 +0000 |
| commit | c5d3ba1aad51caed70e0f2e6e52fe6d4436bcae4 (patch) | |
| tree | fb624c1707f6608d02c3a29dbd9df894ba43fe85 /clang/test | |
| parent | ae79fdf170eab5b9fa3a5bb81bf9ad8c6408d592 (diff) | |
| download | bcm5719-llvm-c5d3ba1aad51caed70e0f2e6e52fe6d4436bcae4.tar.gz bcm5719-llvm-c5d3ba1aad51caed70e0f2e6e52fe6d4436bcae4.zip | |
When compiling with -fno-threadsafe-statics, guard variables for globals with internal linkage don't have to be i64, i8 works just fine!
llvm-svn: 130286
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/threadsafe-statics.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/threadsafe-statics.cpp b/clang/test/CodeGenCXX/threadsafe-statics.cpp index 65ebc43c5d2..8afc2746f42 100644 --- a/clang/test/CodeGenCXX/threadsafe-statics.cpp +++ b/clang/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 |

