@@ -331,37 +331,37 @@ def ConstVectorAttr : CIR_Attr<"ConstVector", "const_vector",
331331}
332332
333333//===----------------------------------------------------------------------===//
334- // ConstStructAttr
334+ // ConstRecordAttr
335335//===----------------------------------------------------------------------===//
336336
337- def ConstStructAttr : CIR_Attr<"ConstStruct ", "const_struct ",
337+ def ConstRecordAttr : CIR_Attr<"ConstRecord ", "const_record ",
338338 [TypedAttrInterface]> {
339- let summary = "Represents a constant struct ";
339+ let summary = "Represents a constant record ";
340340 let description = [{
341341 Effectively supports "struct-like" constants. It's must be built from
342342 an `mlir::ArrayAttr `instance where each elements is a typed attribute
343343 (`mlir::TypedAttribute`).
344344
345345 Example:
346346 ```
347- cir.global external @rgb2 = #cir.const_struct <{0 : i8,
347+ cir.global external @rgb2 = #cir.const_record <{0 : i8,
348348 5 : i64, #cir.null : !cir.ptr<i8>
349- }> : !cir.struct <"", i8, i64, !cir.ptr<i8>>
349+ }> : !cir.record <"", i8, i64, !cir.ptr<i8>>
350350 ```
351351 }];
352352
353353 let parameters = (ins AttributeSelfTypeParameter<"">:$type,
354354 "mlir::ArrayAttr":$members);
355355
356356 let builders = [
357- AttrBuilderWithInferredContext<(ins "cir::StructType ":$type,
357+ AttrBuilderWithInferredContext<(ins "cir::RecordType ":$type,
358358 "mlir::ArrayAttr":$members), [{
359359 return $_get(type.getContext(), type, members);
360360 }]>
361361 ];
362362
363363 let assemblyFormat = [{
364- `<` custom<StructMembers >($members) `>`
364+ `<` custom<RecordMembers >($members) `>`
365365 }];
366366
367367 let genVerifyDecl = 1;
@@ -576,7 +576,7 @@ def DataMemberAttr : CIR_Attr<"DataMember", "data_member",
576576 pointer-to-data-member value.
577577
578578 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
580580 parameter indicates a null pointer-to-data-member value.
581581
582582 Example:
@@ -687,7 +687,7 @@ def GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [TypedAttrInterface]>
687687
688688 A list of indices can be optionally passed and each element subsequently
689689 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
691691 for `!cir.ptr`, an offset is applied. The first index is relative to the
692692 original symbol type, not the produced one.
693693
@@ -764,9 +764,9 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
764764 layout is determined by the C++ ABI used (clang only implements
765765 itanium on CIRGen).
766766
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 `,
768768 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
770770 an IntAttr for flags.
771771
772772 Example:
@@ -776,7 +776,7 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
776776
777777 cir.global external @type_info_B = #cir.typeinfo<<
778778 {#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>>
780780 ```
781781 }];
782782
@@ -790,11 +790,11 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
790790 }]>
791791 ];
792792
793- // Checks struct element types should match the array for every equivalent
793+ // Checks record element types should match the array for every equivalent
794794 // element type.
795795 let genVerifyDecl = 1;
796796 let assemblyFormat = [{
797- `<` custom<StructMembers >($data) `>`
797+ `<` custom<RecordMembers >($data) `>`
798798 }];
799799}
800800
@@ -805,7 +805,7 @@ def TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
805805def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
806806 let summary = "Represents a C++ vtable";
807807 let description = [{
808- Wraps a #cir.const_struct containing vtable data.
808+ Wraps a #cir.const_record containing vtable data.
809809
810810 Example:
811811 ```
@@ -816,11 +816,11 @@ def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
816816 #cir.global_view<@_ZN1BD0Ev> : !cir.ptr<i8>,
817817 #cir.global_view<@_ZNK1A5quackEv> : !cir.ptr<i8>]>
818818 : !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>>
820820 ```
821821 }];
822822
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
824824 // vtable information.
825825 let parameters = (ins AttributeSelfTypeParameter<"">:$type,
826826 "mlir::ArrayAttr":$vtable_data);
@@ -834,21 +834,21 @@ def VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
834834
835835 let genVerifyDecl = 1;
836836 let assemblyFormat = [{
837- `<` custom<StructMembers >($vtable_data) `>`
837+ `<` custom<RecordMembers >($vtable_data) `>`
838838 }];
839839}
840840
841841//===----------------------------------------------------------------------===//
842- // StructLayoutAttr
842+ // RecordLayoutAttr
843843//===----------------------------------------------------------------------===//
844844
845- // Used to decouple layout information from the struct type. StructType 's
845+ // Used to decouple layout information from the record type. RecordType 's
846846// uses this attribute to cache that information.
847847
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";
850850 let description = [{
851- Holds layout information often queried by !cir.struct users
851+ Holds layout information often queried by !cir.record users
852852 during lowering passes and optimizations.
853853 }];
854854
@@ -888,7 +888,7 @@ def DynamicCastInfoAttr
888888 Provide ABI specific information about a dynamic cast operation.
889889
890890 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.
892892
893893 The `runtimeFunc` parameter gives the `__dynamic_cast` function which is
894894 provided by the runtime. The `badCastFunc` parameter gives the
0 commit comments