@@ -331,37 +331,37 @@ def ConstVectorAttr : CIR_Attr<"ConstVector", "const_vector",
331
331
}
332
332
333
333
//===----------------------------------------------------------------------===//
334
- // ConstStructAttr
334
+ // ConstRecordAttr
335
335
//===----------------------------------------------------------------------===//
336
336
337
- def ConstStructAttr : CIR_Attr<"ConstStruct ", "const_struct ",
337
+ def ConstRecordAttr : CIR_Attr<"ConstRecord ", "const_record ",
338
338
[TypedAttrInterface]> {
339
- let summary = "Represents a constant struct ";
339
+ let summary = "Represents a constant record ";
340
340
let description = [{
341
341
Effectively supports "struct-like" constants. It's must be built from
342
342
an `mlir::ArrayAttr `instance where each elements is a typed attribute
343
343
(`mlir::TypedAttribute`).
344
344
345
345
Example:
346
346
```
347
- cir.global external @rgb2 = #cir.const_struct <{0 : i8,
347
+ cir.global external @rgb2 = #cir.const_record <{0 : i8,
348
348
5 : i64, #cir.null : !cir.ptr<i8>
349
- }> : !cir.struct <"", i8, i64, !cir.ptr<i8>>
349
+ }> : !cir.record <"", i8, i64, !cir.ptr<i8>>
350
350
```
351
351
}];
352
352
353
353
let parameters = (ins AttributeSelfTypeParameter<"">:$type,
354
354
"mlir::ArrayAttr":$members);
355
355
356
356
let builders = [
357
- AttrBuilderWithInferredContext<(ins "cir::StructType ":$type,
357
+ AttrBuilderWithInferredContext<(ins "cir::RecordType ":$type,
358
358
"mlir::ArrayAttr":$members), [{
359
359
return $_get(type.getContext(), type, members);
360
360
}]>
361
361
];
362
362
363
363
let assemblyFormat = [{
364
- `<` custom<StructMembers >($members) `>`
364
+ `<` custom<RecordMembers >($members) `>`
365
365
}];
366
366
367
367
let genVerifyDecl = 1;
@@ -576,7 +576,7 @@ def DataMemberAttr : CIR_Attr<"DataMember", "data_member",
576
576
pointer-to-data-member value.
577
577
578
578
The `member_index` parameter represents the index of the pointed-to member
579
- within its containing struct . It is an optional parameter; lack of this
579
+ within its containing record . It is an optional parameter; lack of this
580
580
parameter indicates a null pointer-to-data-member value.
581
581
582
582
Example:
@@ -687,7 +687,7 @@ def GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [TypedAttrInterface]>
687
687
688
688
A list of indices can be optionally passed and each element subsequently
689
689
indexes underlying types. For `symbol` types like `!cir.array`
690
- and `!cir.struct `, it leads to the constant address of sub-elements, while
690
+ and `!cir.record `, it leads to the constant address of sub-elements, while
691
691
for `!cir.ptr`, an offset is applied. The first index is relative to the
692
692
original symbol type, not the produced one.
693
693
@@ -764,9 +764,9 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
764
764
layout is determined by the C++ ABI used (clang only implements
765
765
itanium on CIRGen).
766
766
767
- The verifier enforces that the output type is always a `!cir.struct `,
767
+ The verifier enforces that the output type is always a `!cir.record `,
768
768
and that the ArrayAttr element types match the equivalent member type
769
- for the resulting struct , i.e, a GlobalViewAttr for symbol reference or
769
+ for the resulting record , i.e, a GlobalViewAttr for symbol reference or
770
770
an IntAttr for flags.
771
771
772
772
Example:
@@ -776,7 +776,7 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
776
776
777
777
cir.global external @type_info_B = #cir.typeinfo<<
778
778
{#cir.global_view<@_ZTVN10__cxxabiv120__si_class_type_infoE, [2]> : !cir.ptr<i8>}
779
- >> : !cir.struct <"", !cir.ptr<i8>>
779
+ >> : !cir.record <"", !cir.ptr<i8>>
780
780
```
781
781
}];
782
782
@@ -790,11 +790,11 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
790
790
}]>
791
791
];
792
792
793
- // Checks struct element types should match the array for every equivalent
793
+ // Checks record element types should match the array for every equivalent
794
794
// element type.
795
795
let genVerifyDecl = 1;
796
796
let assemblyFormat = [{
797
- `<` custom<StructMembers >($data) `>`
797
+ `<` custom<RecordMembers >($data) `>`
798
798
}];
799
799
}
800
800
@@ -805,7 +805,7 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
805
805
def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
806
806
let summary = "Represents a C++ vtable";
807
807
let description = [{
808
- Wraps a #cir.const_struct containing vtable data.
808
+ Wraps a #cir.const_record containing vtable data.
809
809
810
810
Example:
811
811
```
@@ -816,11 +816,11 @@ def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
816
816
#cir.global_view<@_ZN1BD0Ev> : !cir.ptr<i8>,
817
817
#cir.global_view<@_ZNK1A5quackEv> : !cir.ptr<i8>]>
818
818
: !cir.array<!cir.ptr<i8> x 5>}>>
819
- : !cir.struct <"", !cir.array<!cir.ptr<i8> x 5>>
819
+ : !cir.record <"", !cir.array<!cir.ptr<i8> x 5>>
820
820
```
821
821
}];
822
822
823
- // `vtable_data` is const struct with one element, containing an array of
823
+ // `vtable_data` is const record with one element, containing an array of
824
824
// vtable information.
825
825
let parameters = (ins AttributeSelfTypeParameter<"">:$type,
826
826
"mlir::ArrayAttr":$vtable_data);
@@ -834,21 +834,21 @@ def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
834
834
835
835
let genVerifyDecl = 1;
836
836
let assemblyFormat = [{
837
- `<` custom<StructMembers >($vtable_data) `>`
837
+ `<` custom<RecordMembers >($vtable_data) `>`
838
838
}];
839
839
}
840
840
841
841
//===----------------------------------------------------------------------===//
842
- // StructLayoutAttr
842
+ // RecordLayoutAttr
843
843
//===----------------------------------------------------------------------===//
844
844
845
- // Used to decouple layout information from the struct type. StructType 's
845
+ // Used to decouple layout information from the record type. RecordType 's
846
846
// uses this attribute to cache that information.
847
847
848
- def StructLayoutAttr : CIR_Attr<"StructLayout ", "struct_layout "> {
849
- let summary = "ABI specific information about a struct layout";
848
+ def RecordLayoutAttr : CIR_Attr<"RecordLayout ", "record_layout "> {
849
+ let summary = "ABI specific information about a record layout";
850
850
let description = [{
851
- Holds layout information often queried by !cir.struct users
851
+ Holds layout information often queried by !cir.record users
852
852
during lowering passes and optimizations.
853
853
}];
854
854
@@ -888,7 +888,7 @@ def DynamicCastInfoAttr
888
888
Provide ABI specific information about a dynamic cast operation.
889
889
890
890
The `srcRtti` and the `destRtti` parameters give the RTTI of the source
891
- struct type and the destination struct type, respectively.
891
+ record type and the destination record type, respectively.
892
892
893
893
The `runtimeFunc` parameter gives the `__dynamic_cast` function which is
894
894
provided by the runtime. The `badCastFunc` parameter gives the
0 commit comments