1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fobjc-runtime=macosx-10.7 -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-runtime=macosx-10.7 -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
26 // CHECK: call ptr @llvm.objc.autoreleasePoolPush
27 // CHECK: [[T:%.*]] = load ptr, ptr [[A:%.*]]
28 // CHECK: call void @llvm.objc.autoreleasePoolPop
30 int tryTo(int (*f)(void)) {
39 // CHECK-LABEL: define{{.*}} i32 @tryTo(ptr
40 // CHECK: [[RET:%.*]] = alloca i32,
41 // CHECK: [[T0:%.*]] = call ptr @llvm.objc.autoreleasePoolPush()
42 // CHECK-NEXT: [[T1:%.*]] = load ptr, ptr {{%.*}},
43 // CHECK-NEXT: [[T2:%.*]] = invoke i32 [[T1]]()
44 // CHECK: store i32 [[T2]], ptr [[RET]]
45 // CHECK: invoke void @objc_autoreleasePoolPop(ptr [[T0]])
46 // CHECK: landingpad { ptr, i32 }
47 // CHECK-NEXT: catch ptr null
48 // CHECK: call ptr @objc_begin_catch
49 // CHECK-NEXT: store i32 0, ptr [[RET]]
50 // CHECK: call void @objc_end_catch()