Teach TreeTransform how to transform a pack expansion type into
[clang.git] / test / CodeGenCXX / threadsafe-statics-exceptions.cpp
blob87be57295cbd79637e6e44ded13702eaad8c95fe
1 // RUN: %clang_cc1 -emit-llvm -o - -fexceptions -triple x86_64-apple-darwin10 %s | FileCheck %s
3 struct X {
4 X();
5 ~X();
6 };
8 struct Y { };
10 // CHECK: define void @_Z1fv
11 void f() {
12 // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ1fvE1x)
13 // CHECK: invoke void @_ZN1XC1Ev
14 // CHECK: call i32 @__cxa_atexit
15 // CHECK-NEXT: call void @__cxa_guard_release(i64* @_ZGVZ1fvE1x)
16 // CHECK: br
17 static X x;
19 // CHECK: call i8* @__cxa_allocate_exception
20 // CHECK: call void @__cxa_throw
21 throw Y();
23 // Finally, the landing pad.
24 // CHECK: call i8* @llvm.eh.exception()
25 // CHECK: call i32 (i8*, i8*, ...)* @llvm.eh.selector
26 // CHECK: call void @__cxa_guard_abort(i64* @_ZGVZ1fvE1x)
27 // CHECK: call void @_Unwind_Resume_or_Rethrow
28 // CHECK: unreachable