@@ -12,39 +12,39 @@ struct String {
12
12
// StringView::StringView(String const&)
13
13
//
14
14
// CHECK: cir.func linkonce_odr @_ZN10StringViewC2ERK6String
15
- // CHECK: %0 = cir.alloca !cir.ptr<!22struct2EStringView22 >, cir.ptr <!cir.ptr<!22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
16
- // CHECK: %1 = cir.alloca !cir.ptr<!22struct2EString22 >, cir.ptr <!cir.ptr<!22struct2EString22 >>, ["s", init] {alignment = 8 : i64}
17
- // CHECK: cir.store %arg0, %0 : !cir.ptr<!22struct2EStringView22 >
18
- // CHECK: cir.store %arg1, %1 : !cir.ptr<!22struct2EString22 >
19
- // CHECK: %2 = cir.load %0 : cir.ptr <!cir.ptr<!22struct2EStringView22 >>
15
+ // CHECK: %0 = cir.alloca !cir.ptr<!ty_22struct2EStringView22 >, cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
16
+ // CHECK: %1 = cir.alloca !cir.ptr<!ty_22struct2EString22 >, cir.ptr <!cir.ptr<!ty_22struct2EString22 >>, ["s", init] {alignment = 8 : i64}
17
+ // CHECK: cir.store %arg0, %0 : !cir.ptr<!ty_22struct2EStringView22 >
18
+ // CHECK: cir.store %arg1, %1 : !cir.ptr<!ty_22struct2EString22 >
19
+ // CHECK: %2 = cir.load %0 : cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>
20
20
// CHECK: %3 = "cir.struct_element_addr"(%0) <{member_name = "size"}>
21
- // CHECK: %4 = cir.load %1 : cir.ptr <!cir.ptr<!22struct2EString22 >>
21
+ // CHECK: %4 = cir.load %1 : cir.ptr <!cir.ptr<!ty_22struct2EString22 >>
22
22
// CHECK: %5 = "cir.struct_element_addr"(%0) <{member_name = "size"}>
23
23
// CHECK: %6 = cir.load %5 : cir.ptr <i64>, i64
24
24
// CHECK: cir.store %6, %3 : i64, cir.ptr <i64>
25
25
// CHECK: cir.return
26
26
// CHECK: }
27
27
28
28
// DISABLE: cir.func linkonce_odr @_ZN10StringViewC2ERK6String
29
- // DISABLE-NEXT: %0 = cir.alloca !cir.ptr<!22struct2EStringView22 >, cir.ptr <!cir.ptr<!22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
29
+ // DISABLE-NEXT: %0 = cir.alloca !cir.ptr<!ty_22struct2EStringView22 >, cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
30
30
31
31
// StringView::operator=(StringView&&)
32
32
//
33
33
// CHECK: cir.func linkonce_odr @_ZN10StringViewaSEOS_
34
- // CHECK: %0 = cir.alloca !cir.ptr<!22struct2EStringView22 >, cir.ptr <!cir.ptr<!22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
35
- // CHECK: %1 = cir.alloca !cir.ptr<!22struct2EStringView22 >, cir.ptr <!cir.ptr<!22struct2EStringView22 >>, ["", init] {alignment = 8 : i64}
36
- // CHECK: %2 = cir.alloca !cir.ptr<!22struct2EStringView22 >, cir.ptr <!cir.ptr<!22struct2EStringView22 >>, ["__retval"] {alignment = 8 : i64}
37
- // CHECK: cir.store %arg0, %0 : !cir.ptr<!22struct2EStringView22 >
38
- // CHECK: cir.store %arg1, %1 : !cir.ptr<!22struct2EStringView22 >
39
- // CHECK: %3 = cir.load deref %0 : cir.ptr <!cir.ptr<!22struct2EStringView22 >>
40
- // CHECK: %4 = cir.load %1 : cir.ptr <!cir.ptr<!22struct2EStringView22 >>
34
+ // CHECK: %0 = cir.alloca !cir.ptr<!ty_22struct2EStringView22 >, cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>, ["this", init] {alignment = 8 : i64}
35
+ // CHECK: %1 = cir.alloca !cir.ptr<!ty_22struct2EStringView22 >, cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>, ["", init] {alignment = 8 : i64}
36
+ // CHECK: %2 = cir.alloca !cir.ptr<!ty_22struct2EStringView22 >, cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>, ["__retval"] {alignment = 8 : i64}
37
+ // CHECK: cir.store %arg0, %0 : !cir.ptr<!ty_22struct2EStringView22 >
38
+ // CHECK: cir.store %arg1, %1 : !cir.ptr<!ty_22struct2EStringView22 >
39
+ // CHECK: %3 = cir.load deref %0 : cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>
40
+ // CHECK: %4 = cir.load %1 : cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>
41
41
// CHECK: %5 = "cir.struct_element_addr"(%0) <{member_name = "size"}>
42
42
// CHECK: %6 = cir.load %5 : cir.ptr <i64>, i64
43
43
// CHECK: %7 = "cir.struct_element_addr"(%0) <{member_name = "size"}>
44
44
// CHECK: cir.store %6, %7 : i64, cir.ptr <i64>
45
- // CHECK: cir.store %3, %2 : !cir.ptr<!22struct2EStringView22 >
46
- // CHECK: %8 = cir.load %2 : cir.ptr <!cir.ptr<!22struct2EStringView22 >>
47
- // CHECK: cir.return %8 : !cir.ptr<!22struct2EStringView22 >
45
+ // CHECK: cir.store %3, %2 : !cir.ptr<!ty_22struct2EStringView22 >
46
+ // CHECK: %8 = cir.load %2 : cir.ptr <!cir.ptr<!ty_22struct2EStringView22 >>
47
+ // CHECK: cir.return %8 : !cir.ptr<!ty_22struct2EStringView22 >
48
48
// CHECK: }
49
49
50
50
// DISABLE: cir.func @_ZN10StringViewaSEOS_
@@ -68,16 +68,16 @@ int main() {
68
68
69
69
// CHECK: cir.func @main() -> i32 {
70
70
// CHECK: %0 = cir.alloca i32, cir.ptr <i32>, ["__retval"] {alignment = 4 : i64}
71
- // CHECK: %1 = cir.alloca !22struct2EStringView22 , cir.ptr <!22struct2EStringView22 >, ["sv"] {alignment = 8 : i64}
72
- // CHECK: cir.call @_ZN10StringViewC2Ev(%1) : (!cir.ptr<!22struct2EStringView22 >) -> ()
71
+ // CHECK: %1 = cir.alloca !ty_22struct2EStringView22 , cir.ptr <!ty_22struct2EStringView22 >, ["sv"] {alignment = 8 : i64}
72
+ // CHECK: cir.call @_ZN10StringViewC2Ev(%1) : (!cir.ptr<!ty_22struct2EStringView22 >) -> ()
73
73
// CHECK: cir.scope {
74
- // CHECK: %3 = cir.alloca !22struct2EString22 , cir.ptr <!22struct2EString22 >, ["s"] {alignment = 8 : i64}
75
- // CHECK: %4 = cir.alloca !22struct2EStringView22 , cir.ptr <!22struct2EStringView22 >, ["ref.tmp"] {alignment = 8 : i64}
74
+ // CHECK: %3 = cir.alloca !ty_22struct2EString22 , cir.ptr <!ty_22struct2EString22 >, ["s"] {alignment = 8 : i64}
75
+ // CHECK: %4 = cir.alloca !ty_22struct2EStringView22 , cir.ptr <!ty_22struct2EStringView22 >, ["ref.tmp"] {alignment = 8 : i64}
76
76
// CHECK: %5 = cir.get_global @".str" : cir.ptr <!cir.array<i8 x 3>>
77
77
// CHECK: %6 = cir.cast(array_to_ptrdecay, %5 : !cir.ptr<!cir.array<i8 x 3>>), !cir.ptr<i8>
78
- // CHECK: cir.call @_ZN6StringC2EPKc(%3, %6) : (!cir.ptr<!22struct2EString22 >, !cir.ptr<i8>) -> ()
79
- // CHECK: cir.call @_ZN10StringViewC2ERK6String(%4, %3) : (!cir.ptr<!22struct2EStringView22 >, !cir.ptr<!22struct2EString22 >) -> ()
80
- // CHECK: %7 = cir.call @_ZN10StringViewaSEOS_(%1, %4) : (!cir.ptr<!22struct2EStringView22 >, !cir.ptr<!22struct2EStringView22 >) -> !cir.ptr<!22struct2EStringView22 >
78
+ // CHECK: cir.call @_ZN6StringC2EPKc(%3, %6) : (!cir.ptr<!ty_22struct2EString22 >, !cir.ptr<i8>) -> ()
79
+ // CHECK: cir.call @_ZN10StringViewC2ERK6String(%4, %3) : (!cir.ptr<!ty_22struct2EStringView22 >, !cir.ptr<!ty_22struct2EString22 >) -> ()
80
+ // CHECK: %7 = cir.call @_ZN10StringViewaSEOS_(%1, %4) : (!cir.ptr<!ty_22struct2EStringView22 >, !cir.ptr<!ty_22struct2EStringView22 >) -> !cir.ptr<!ty_22struct2EStringView22 >
81
81
// CHECK: }
82
82
// CHECK: %2 = cir.load %0 : cir.ptr <i32>, i32
83
83
// CHECK: cir.return %2 : i32
0 commit comments