Skip to content

Commit 549dcf0

Browse files
committed
[CIR][NFC] remove redundant test in CIR/IR/data-member-ptr.cir
As suggested in #401, this patch removes the `get_global_member` test in `CIR/IR/data-member-ptr.cir` as it is redundant.
1 parent 981c976 commit 549dcf0

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

clang/test/CIR/IR/data-member-ptr.cir

-14
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
!s32i = !cir.int<s, 32>
44
!ty_22Foo22 = !cir.struct<struct "Foo" {!s32i}>
55

6-
#global_ptr = #cir.data_member<0> : !cir.data_member<!s32i in !ty_22Foo22>
7-
86
module {
97
cir.func @null_member() {
108
%0 = cir.const #cir.data_member<null> : !cir.data_member<!s32i in !ty_22Foo22>
@@ -16,12 +14,6 @@ module {
1614
%1 = cir.get_runtime_member %arg0[%0 : !cir.data_member<!s32i in !ty_22Foo22>] : !cir.ptr<!ty_22Foo22> -> !cir.ptr<!s32i>
1715
cir.return
1816
}
19-
20-
cir.func @get_global_member(%arg0: !cir.ptr<!ty_22Foo22>) {
21-
%0 = cir.const #global_ptr
22-
%1 = cir.get_runtime_member %arg0[%0 : !cir.data_member<!s32i in !ty_22Foo22>] : !cir.ptr<!ty_22Foo22> -> !cir.ptr<!s32i>
23-
cir.return
24-
}
2517
}
2618

2719
// CHECK: module {
@@ -37,10 +29,4 @@ module {
3729
// CHECK-NEXT: cir.return
3830
// CHECK-NEXT: }
3931

40-
// CHECK-NEXT: cir.func @get_global_member(%arg0: !cir.ptr<!ty_22Foo22>) {
41-
// CHECK-NEXT: %0 = cir.const #cir.data_member<0> : !cir.data_member<!s32i in !ty_22Foo22>
42-
// CHECK-NEXT: %1 = cir.get_runtime_member %arg0[%0 : !cir.data_member<!s32i in !ty_22Foo22>] : !cir.ptr<!ty_22Foo22> -> !cir.ptr<!s32i>
43-
// CHECK-NEXT: cir.return
44-
// CHECK-NEXT: }
45-
4632
// CHECK: }

0 commit comments

Comments
 (0)