|
1 |
| -// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -emit-llvm -fobjc-arc -fexceptions -fobjc-exceptions -fobjc-arc-exceptions -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s |
| 1 | +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -emit-llvm -fobjc-arc -fexceptions -fobjc-exceptions -fobjc-arc-exceptions -fobjc-runtime=gnustep-2.0 -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-O0 |
| 2 | +// RUN: %clang_cc1 -O2 -triple x86_64-pc-windows-msvc -emit-llvm -fobjc-arc -fexceptions -fobjc-exceptions -fobjc-arc-exceptions -fobjc-runtime=gnustep-2.0 -mllvm -enable-objc-arc-opts=false -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-O2 |
2 | 3 |
|
3 | 4 | // WinEH requires funclet tokens on nounwind intrinsics if they can lower to
|
4 | 5 | // regular function calls in the course of IR transformations.
|
@@ -40,25 +41,29 @@ void try_catch_with_objc_intrinsic() {
|
40 | 41 | // CHECK: [ "funclet"(token [[CATCHPAD]]) ]
|
41 | 42 | // CHECK: unwind label %[[CLEANUP2]]
|
42 | 43 | // CHECK: call
|
43 |
| -// CHECK: @llvm.objc.storeStrong |
| 44 | +// CHECK-O0: @llvm.objc.storeStrong |
| 45 | +// CHECK-O2: @llvm.objc.release |
44 | 46 | // CHECK: [ "funclet"(token [[CATCHPAD]]) ]
|
45 |
| -// CHECK: catchret from [[CATCHPAD]] to label %catchret.dest |
| 47 | +// CHECK-O0: catchret from [[CATCHPAD]] to label %catchret.dest |
| 48 | +// CHECK-O2: catchret from [[CATCHPAD]] to label %eh.cont |
46 | 49 | //
|
47 |
| -// This block exists and it's empty: |
48 |
| -// CHECK: catchret.dest: |
49 |
| -// CHECK-NEXT: br label %eh.cont |
| 50 | +// In debug mode, this block exists and it's empty: |
| 51 | +// CHECK-O0: catchret.dest: |
| 52 | +// CHECK-O0-NEXT: br label %eh.cont |
50 | 53 | //
|
51 | 54 | // CHECK: [[CLEANUP2]]:
|
52 | 55 | // CHECK-NEXT: [[CLEANUPPAD2:%[0-9]+]] = cleanuppad within [[CATCHPAD]]
|
53 | 56 | // CHECK: call
|
54 |
| -// CHECK: @llvm.objc.storeStrong |
| 57 | +// CHECK-O0: @llvm.objc.storeStrong |
| 58 | +// CHECK-O2: @llvm.objc.release |
55 | 59 | // CHECK: [ "funclet"(token [[CLEANUPPAD2]]) ]
|
56 | 60 | // CHECK: cleanupret from [[CLEANUPPAD2]]
|
57 | 61 | // CHECK: unwind label %[[CLEANUP1]]
|
58 | 62 | //
|
59 | 63 | // CHECK: [[CLEANUP1]]:
|
60 | 64 | // CHECK-NEXT: [[CLEANUPPAD1:%[0-9]+]] = cleanuppad within none
|
61 | 65 | // CHECK: call
|
62 |
| -// CHECK: @llvm.objc.storeStrong |
| 66 | +// CHECK-O0: @llvm.objc.storeStrong |
| 67 | +// CHECK-O2: @llvm.objc.release |
63 | 68 | // CHECK: [ "funclet"(token [[CLEANUPPAD1]]) ]
|
64 | 69 | // CHECK: cleanupret from [[CLEANUPPAD1]] unwind to caller
|
0 commit comments