Author: Erich Keane Date: 2026-02-24T15:10:43Z New Revision: 1ecc1535ffd29472687290d5023c3a8a52e49a91
URL: https://github.com/llvm/llvm-project/commit/1ecc1535ffd29472687290d5023c3a8a52e49a91 DIFF: https://github.com/llvm/llvm-project/commit/1ecc1535ffd29472687290d5023c3a8a52e49a91.diff LOG: [CIR] Fix global-refs test that got committed in github 'race' (#183068) Despite my best efforts, this crossed in the air with the attributes on arguments patch, and thus had a problem with the test. This patch updates the test to be tolerant of the attributes. Added: Modified: clang/test/CIR/CodeGenCXX/global-refs.cpp Removed: ################################################################################ diff --git a/clang/test/CIR/CodeGenCXX/global-refs.cpp b/clang/test/CIR/CodeGenCXX/global-refs.cpp index 8c891f377f1c2..cf9070191bcb7 100644 --- a/clang/test/CIR/CodeGenCXX/global-refs.cpp +++ b/clang/test/CIR/CodeGenCXX/global-refs.cpp @@ -49,7 +49,7 @@ const DefCtor &constDefCtorRef{}; WithCtor withCtor{}; // CIR-BEFORE: cir.global external @withCtor = ctor : !rec_WithCtor { // CIR-BEFORE-NEXT: %[[GET_GLOB:.*]] = cir.get_global @withCtor : !cir.ptr<!rec_WithCtor> -// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtor>) -> () +// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtor>{{.*}}) -> () // CIR-BEFORE-NEXT: } {alignment = 1 : i64, ast = #cir.var.decl.ast} // CIR-AFTER: cir.global external @withCtor = #cir.zero : !rec_WithCtor {alignment = 1 : i64, ast = #cir.var.decl.ast} // CIR-AFTER-NEXT: cir.func internal private @__cxx_global_var_init{{.*}}() { @@ -67,7 +67,7 @@ const WithCtor &constWithCtorRef{}; // CIR-BEFORE: cir.global external @constWithCtorRef = ctor : !cir.ptr<!rec_WithCtor> { // CIR-BEFORE-NEXT: %[[GET_GLOB:.*]] = cir.get_global @constWithCtorRef : !cir.ptr<!cir.ptr<!rec_WithCtor>> // CIR-BEFORE-NEXT: %[[GET_GLOB_OBJ:.*]] = cir.get_global @_ZGR16constWithCtorRef_ : !cir.ptr<!rec_WithCtor> -// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ev(%[[GET_GLOB_OBJ]]) : (!cir.ptr<!rec_WithCtor>) -> () +// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ev(%[[GET_GLOB_OBJ]]) : (!cir.ptr<!rec_WithCtor>{{.*}}) -> () // CIR-BEFORE-NEXT: cir.store align(8) %[[GET_GLOB_OBJ]], %[[GET_GLOB]] : !cir.ptr<!rec_WithCtor>, !cir.ptr<!cir.ptr<!rec_WithCtor>> // CIR-BEFORE-NEXT: } {alignment = 8 : i64, ast = #cir.var.decl.ast} // CIR-AFTER: cir.global external @constWithCtorRef = #cir.ptr<null> : !cir.ptr<!rec_WithCtor> {alignment = 8 : i64, ast = #cir.var.decl.ast} @@ -85,7 +85,7 @@ const WithCtor &constWithCtorRef2{5}; // CIR-BEFORE-NEXT: %[[GET_GLOB:.*]] = cir.get_global @constWithCtorRef2 : !cir.ptr<!cir.ptr<!rec_WithCtor>> // CIR-BEFORE-NEXT: %[[GET_GLOB_OBJ:.*]] = cir.get_global @_ZGR17constWithCtorRef2_ : !cir.ptr<!rec_WithCtor> // CIR-BEFORE-NEXT: %[[FIVE:.*]] = cir.const #cir.int<5> : !s32i -// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ei(%[[GET_GLOB_OBJ]], %[[FIVE]]) : (!cir.ptr<!rec_WithCtor>, !s32i) -> () +// CIR-BEFORE-NEXT: cir.call @_ZN8WithCtorC1Ei(%[[GET_GLOB_OBJ]], %[[FIVE]]) : (!cir.ptr<!rec_WithCtor>{{.*}}, !s32i{{.*}}) -> () // CIR-BEFORE-NEXT: cir.store align(8) %[[GET_GLOB_OBJ]], %[[GET_GLOB]] : !cir.ptr<!rec_WithCtor>, !cir.ptr<!cir.ptr<!rec_WithCtor>> // CIR-BEFORE-NEXT: } {alignment = 8 : i64, ast = #cir.var.decl.ast} // CIR-AFTER: cir.global external @constWithCtorRef2 = #cir.ptr<null> : !cir.ptr<!rec_WithCtor> {alignment = 8 : i64, ast = #cir.var.decl.ast} @@ -102,10 +102,10 @@ const WithCtor &constWithCtorRef2{5}; WithCtorDtor withCtorDtor{}; // CIR-BEFORE: cir.global external @withCtorDtor = ctor : !rec_WithCtorDtor { // CIR-BEFORE-NEXT: %[[GET_GLOB:.*]] = cir.get_global @withCtorDtor : !cir.ptr<!rec_WithCtorDtor> -// CIR-BEFORE-NEXT: cir.call @_ZN12WithCtorDtorC1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtorDtor>) -> () +// CIR-BEFORE-NEXT: cir.call @_ZN12WithCtorDtorC1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtorDtor>{{.*}}) -> () // CIR-BEFORE-NEXT: } dtor { // CIR-BEFORE-NEXT: %[[GET_GLOB:.*]] = cir.get_global @withCtorDtor : !cir.ptr<!rec_WithCtorDtor> -// CIR-BEFORE-NEXT: cir.call @_ZN12WithCtorDtorD1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtorDtor>) -> () +// CIR-BEFORE-NEXT: cir.call @_ZN12WithCtorDtorD1Ev(%[[GET_GLOB]]) : (!cir.ptr<!rec_WithCtorDtor>{{.*}}) -> () // CIR-BEFORE-NEXT: } {alignment = 1 : i64, ast = #cir.var.decl.ast} // CIR-AFTER: cir.global external @withCtorDtor = #cir.zero : !rec_WithCtorDtor {alignment = 1 : i64, ast = #cir.var.decl.ast} // CIR-AFTER: cir.func internal private @__cxx_global_var_init{{.*}}() { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
