From 8a8ba9e86bcd040629533b681ab4a42fe8da08ab Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Fri, 30 Aug 2024 18:12:43 -0700 Subject: [PATCH] [CIR] Reland failing tests (#811) --- clang/lib/CIR/CodeGen/CIRGenCleanup.h | 4 ++-- clang/test/CIR/CodeGen/global-new.cpp | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/clang/lib/CIR/CodeGen/CIRGenCleanup.h b/clang/lib/CIR/CodeGen/CIRGenCleanup.h index 99a730b51769..76547ceebfe4 100644 --- a/clang/lib/CIR/CodeGen/CIRGenCleanup.h +++ b/clang/lib/CIR/CodeGen/CIRGenCleanup.h @@ -621,12 +621,12 @@ EHScopeStack::stabilize(iterator ir) const { /// The exceptions personality for a function. struct EHPersonality { - const char *PersonalityFn; + const char *PersonalityFn = nullptr; // If this is non-null, this personality requires a non-standard // function for rethrowing an exception after a catchall cleanup. // This function must have prototype void(void*). - const char *CatchallRethrowFn; + const char *CatchallRethrowFn = nullptr; static const EHPersonality &get(CIRGenModule &CGM, const clang::FunctionDecl *FD); diff --git a/clang/test/CIR/CodeGen/global-new.cpp b/clang/test/CIR/CodeGen/global-new.cpp index dca607b3d167..885d254135b9 100644 --- a/clang/test/CIR/CodeGen/global-new.cpp +++ b/clang/test/CIR/CodeGen/global-new.cpp @@ -1,14 +1,13 @@ -// RUN: true -// DISABLED: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=CIR_BEFORE -// DISABLED: FileCheck %s -check-prefix=CIR_AFTER --input-file=%t.cir -// DISABLED: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-llvm %s -o %t.ll -// DISABLED: FileCheck %s -check-prefix=LLVM --input-file=%t.ll -// DISABLED: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir -fexceptions -fcxx-exceptions %s -o %t.eh.cir -// DISABLED: FileCheck %s -check-prefix=CIR_EH --input-file=%t.eh.cir -// DISABLED: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir-flat -fexceptions -fcxx-exceptions %s -o %t.eh.flat.cir -// DISABLED: FileCheck %s -check-prefix=CIR_FLAT_EH --input-file=%t.eh.flat.cir -// DISABLED: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-llvm -fexceptions -fcxx-exceptions %s -o %t.eh.ll -// DISABLED: FileCheck %s -check-prefix=LLVM_EH --input-file=%t.eh.ll +// RUN: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=CIR_BEFORE +// RUN: FileCheck %s -check-prefix=CIR_AFTER --input-file=%t.cir +// RUN: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-llvm %s -o %t.ll +// RUN: FileCheck %s -check-prefix=LLVM --input-file=%t.ll +// RUN: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir -fexceptions -fcxx-exceptions %s -o %t.eh.cir +// RUN: FileCheck %s -check-prefix=CIR_EH --input-file=%t.eh.cir +// RUN: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-cir-flat -fexceptions -fcxx-exceptions %s -o %t.eh.flat.cir +// RUN: FileCheck %s -check-prefix=CIR_FLAT_EH --input-file=%t.eh.flat.cir +// RUN: %clang_cc1 -std=c++20 -triple aarch64-none-linux-android21 -fclangir -emit-llvm -fexceptions -fcxx-exceptions %s -o %t.eh.ll +// RUN: FileCheck %s -check-prefix=LLVM_EH --input-file=%t.eh.ll struct e { e(int); }; e *g = new e(0);