blob: 65ebc43c5d25fbfa5bd01470b472430ad3618dae [file] [log] [blame]
Anders Carlssona508b7d2010-02-06 23:23:06 +00001// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix=WITH-TSS %s
2// RUN: %clang_cc1 -emit-llvm -o - %s -fno-threadsafe-statics | FileCheck -check-prefix=NO-TSS %s
3
4int f();
5
6// WITH-TSS: define void @_Z1gv() nounwind
7// WITH-TSS: call i32 @__cxa_guard_acquire
8// WITH-TSS: call void @__cxa_guard_release
9// WITH-TSS: ret void
10void g() {
11 static int a = f();
12}
13
14// NO-TSS: define void @_Z1gv() nounwind
15// NO-TSS-NOT: call i32 @__cxa_guard_acquire
16// NO-TSS-NOT: call void @__cxa_guard_release
17// NO-TSS: ret void