We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1731b1 commit e744086Copy full SHA for e744086
clang/test/CIR/CodeGen/const-baseclass.cpp
@@ -0,0 +1,20 @@
1
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
2
+// RUN: FileCheck --input-file=%t.cir %s
3
+
4
+struct Empty { };
5
+struct A {
6
+};
7
8
+struct B : A, Empty {
9
+ B() : A(), Empty() { }
10
11
12
+void f() {
13
+ B b1;
14
+}
15
16
+// CHECK-LABEL: @_ZN1BC2Ev
17
+// CHECK: %[[A:.*]] = cir.base_class_addr({{.*}}) [0] -> !cir.ptr<!ty_A>
18
+// CHECK: cir.call @_ZN1AC2Ev(%[[A:.*]]) : (!cir.ptr<!ty_A>) -> ()
19
+// CHECK: %[[BASE:.*]] = cir.base_class_addr({{.*}}) [0] -> !cir.ptr<!ty_Empty>
20
+// CHECK: cir.call @_ZN5EmptyC2Ev(%[[BASE]]) : (!cir.ptr<!ty_Empty>) -> ()
0 commit comments