From a37807ac8a3e9d2880a483940dcd33194f354bf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 22 Nov 2022 20:51:09 +0100 Subject: [PATCH] Revert "[CGObjC] Add run line for release mode in test arc-exceptions-seh.mm (NFC)" This reverts commit 01023bfcd33f922ed8c934ce563e54abe8bfe246. The extended test now triggers undefined behavior: ``` /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:577:41: runtime error: load of value 180, which is not a valid value for type 'bool' #0 0xaaaae3333a30 in hasCFGChanged /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:577:41 #1 0xaaaae3333a30 in llvm::ObjCARCOptPass::run(llvm::Function&, llvm::AnalysisManager&) /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:2494:26 ... ``` --- clang/test/CodeGenObjCXX/arc-exceptions-seh.mm | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/clang/test/CodeGenObjCXX/arc-exceptions-seh.mm b/clang/test/CodeGenObjCXX/arc-exceptions-seh.mm index d5da111..b432abc 100644 --- a/clang/test/CodeGenObjCXX/arc-exceptions-seh.mm +++ b/clang/test/CodeGenObjCXX/arc-exceptions-seh.mm @@ -1,5 +1,4 @@ -// 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 -// 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 +// 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 // WinEH requires funclet tokens on nounwind intrinsics if they can lower to // regular function calls in the course of IR transformations. @@ -41,21 +40,18 @@ void try_catch_with_objc_intrinsic() { // CHECK: [ "funclet"(token [[CATCHPAD]]) ] // CHECK: unwind label %[[CLEANUP2]] // CHECK: call -// CHECK-O0: @llvm.objc.storeStrong -// CHECK-O2: @llvm.objc.release +// CHECK: @llvm.objc.storeStrong // CHECK: [ "funclet"(token [[CATCHPAD]]) ] -// CHECK-O0: catchret from [[CATCHPAD]] to label %catchret.dest -// CHECK-O2: catchret from [[CATCHPAD]] to label %eh.cont +// CHECK: catchret from [[CATCHPAD]] to label %catchret.dest // -// In debug mode, this block exists and it's empty: -// CHECK-O0: catchret.dest: -// CHECK-O0-NEXT: br label %eh.cont +// This block exists and it's empty: +// CHECK: catchret.dest: +// CHECK-NEXT: br label %eh.cont // // CHECK: [[CLEANUP2]]: // CHECK-NEXT: [[CLEANUPPAD2:%[0-9]+]] = cleanuppad within [[CATCHPAD]] // CHECK: call -// CHECK-O0: @llvm.objc.storeStrong -// CHECK-O2: @llvm.objc.release +// CHECK: @llvm.objc.storeStrong // CHECK: [ "funclet"(token [[CLEANUPPAD2]]) ] // CHECK: cleanupret from [[CLEANUPPAD2]] // CHECK: unwind label %[[CLEANUP1]] @@ -63,7 +59,6 @@ void try_catch_with_objc_intrinsic() { // CHECK: [[CLEANUP1]]: // CHECK-NEXT: [[CLEANUPPAD1:%[0-9]+]] = cleanuppad within none // CHECK: call -// CHECK-O0: @llvm.objc.storeStrong -// CHECK-O2: @llvm.objc.release +// CHECK: @llvm.objc.storeStrong // CHECK: [ "funclet"(token [[CLEANUPPAD1]]) ] // CHECK: cleanupret from [[CLEANUPPAD1]] unwind to caller -- 2.7.4