================
@@ -621,6 +621,37 @@ def CIR_VoidType : CIR_Type<"Void", "void"> {
}];
}
+//===----------------------------------------------------------------------===//
+// RecordMemberKind
+//
+// What a record member holds, for members that do not hold source data.
+//===----------------------------------------------------------------------===//
+
+def CIR_RecordMemberKind : CIR_I32EnumAttr<
+ "RecordMemberKind", "what a record member holds", [
+ I32EnumAttrCase<"Data", 0, "data">,
+ I32EnumAttrCase<"Pad", 1, "pad">,
+ I32EnumAttrCase<"Empty", 2, "empty">
----------------
adams381 wrote:
I think Erich has the core of it, but picked a poor example.
```c++
struct S { char : 3; unsigned long long l; };
```
emits
```
{empty !u8i, !u64i}
```
However, this example shows what he means:
```c++
struct C { int a : 3; int : 0; int : 3; };
```
emits
```
{!u8i, pad !cir.array<!u8i x 3>, empty !u8i, pad !cir.array<!u8i x 3>}
```
https://github.com/llvm/llvm-project/pull/215174
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits