Skip to content

Commit 01023bf

Browse files
[CGObjC] Add run line for release mode in test arc-exceptions-seh.mm (NFC)
In release mode `arc-exceptions-seh.mm` fails. It needs `-enable-objc-arc-opts=false` to skip ObjC ARC optimizations. Reviewed By: triplef Differential Revision: https://reviews.llvm.org/D137942
1 parent b50e1bd commit 01023bf

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

clang/test/CodeGenObjCXX/arc-exceptions-seh.mm

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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
23

34
// WinEH requires funclet tokens on nounwind intrinsics if they can lower to
45
// regular function calls in the course of IR transformations.
@@ -40,25 +41,29 @@ void try_catch_with_objc_intrinsic() {
4041
// CHECK: [ "funclet"(token [[CATCHPAD]]) ]
4142
// CHECK: unwind label %[[CLEANUP2]]
4243
// CHECK: call
43-
// CHECK: @llvm.objc.storeStrong
44+
// CHECK-O0: @llvm.objc.storeStrong
45+
// CHECK-O2: @llvm.objc.release
4446
// 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
4649
//
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
5053
//
5154
// CHECK: [[CLEANUP2]]:
5255
// CHECK-NEXT: [[CLEANUPPAD2:%[0-9]+]] = cleanuppad within [[CATCHPAD]]
5356
// CHECK: call
54-
// CHECK: @llvm.objc.storeStrong
57+
// CHECK-O0: @llvm.objc.storeStrong
58+
// CHECK-O2: @llvm.objc.release
5559
// CHECK: [ "funclet"(token [[CLEANUPPAD2]]) ]
5660
// CHECK: cleanupret from [[CLEANUPPAD2]]
5761
// CHECK: unwind label %[[CLEANUP1]]
5862
//
5963
// CHECK: [[CLEANUP1]]:
6064
// CHECK-NEXT: [[CLEANUPPAD1:%[0-9]+]] = cleanuppad within none
6165
// CHECK: call
62-
// CHECK: @llvm.objc.storeStrong
66+
// CHECK-O0: @llvm.objc.storeStrong
67+
// CHECK-O2: @llvm.objc.release
6368
// CHECK: [ "funclet"(token [[CLEANUPPAD1]]) ]
6469
// CHECK: cleanupret from [[CLEANUPPAD1]] unwind to caller

0 commit comments

Comments
 (0)