Skip to content

Commit 072d668

Browse files
committed
[CIR] Account for change to clang behavior to emit ZdlPvm instead of ZdlPV
clang's choice of delete here changes from just hte pointer version to the sized version. Change the test to do the same
1 parent 073536a commit 072d668

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/test/CIR/CodeGen/dtors.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -mconstructor-aliases -clangir-disable-emit-cxx-default -emit-cir %s -o %t.cir
22
// RUN: FileCheck --input-file=%t.cir %s
3-
// XFAIL: *
4-
53

64
enum class EFMode { Always, Verbose };
75

@@ -38,10 +36,10 @@ class B : public A
3836
};
3937

4038
// Class A
41-
// CHECK: ![[ClassA:ty_.*]] = !cir.struct<class "A" {!cir.ptr<!cir.ptr<!cir.func<!cir.int<u, 32> ()>>>} #cir.record.decl.ast>
39+
// CHECK: ![[ClassA:ty_.*]] = !cir.struct<class "A" {!cir.ptr<!cir.ptr<!cir.func<!u32i ()>>>} #cir.record.decl.ast>
4240

4341
// Class B
44-
// CHECK: ![[ClassB:ty_.*]] = !cir.struct<class "B" {!cir.struct<class "A" {!cir.ptr<!cir.ptr<!cir.func<!cir.int<u, 32> ()>>>} #cir.record.decl.ast>}>
42+
// CHECK: ![[ClassB:ty_.*]] = !cir.struct<class "B" {![[ClassA]]}>
4543

4644
// CHECK: cir.func @_Z4bluev()
4745
// CHECK: %0 = cir.alloca !ty_22PSEvent22, !cir.ptr<!ty_22PSEvent22>, ["p", init] {alignment = 8 : i64}
@@ -63,7 +61,7 @@ class B : public A
6361
// CHECK: cir.call @_ZN1BD2Ev(%0) : (!cir.ptr<!ty_22B22>) -> ()
6462

6563
// operator delete(void*) declaration
66-
// CHECK: cir.func private @_ZdlPv(!cir.ptr<!void>)
64+
// CHECK: cir.func private @_ZdlPvm(!cir.ptr<!void>, !u64i)
6765

6866
// B dtor => @B::~B() #2
6967
// Calls dtor #1
@@ -75,7 +73,7 @@ class B : public A
7573
// CHECK: %1 = cir.load %0 : !cir.ptr<!cir.ptr<![[ClassB]]>>, !cir.ptr<![[ClassB]]>
7674
// CHECK: cir.call @_ZN1BD2Ev(%1) : (!cir.ptr<![[ClassB]]>) -> ()
7775
// CHECK: %2 = cir.cast(bitcast, %1 : !cir.ptr<![[ClassB]]>), !cir.ptr<!void>
78-
// CHECK: cir.call @_ZdlPv(%2) : (!cir.ptr<!void>) -> ()
76+
// CHECK: cir.call @_ZdlPvm(%2, %3) : (!cir.ptr<!void>, !u64i) -> ()
7977
// CHECK: cir.return
8078
// CHECK: }
8179

0 commit comments

Comments
 (0)