[clang] [CIR] Upstream minimal support for structure types (PR #135105)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 17:46:56 PDT 2025
================
@@ -400,13 +400,126 @@ def VoidPtr : Type<
"cir::VoidType::get($_builder.getContext()))"> {
}
+//===----------------------------------------------------------------------===//
+// StructType
+//
+// The base type for all RecordDecls.
+//===----------------------------------------------------------------------===//
+
+def CIR_StructType : CIR_Type<"Struct", "struct",
+ [
+ DeclareTypeInterfaceMethods<DataLayoutTypeInterface>,
+ MutableType,
+ ]> {
+ let summary = "CIR struct type";
+ let description = [{
+ Each unique clang::RecordDecl is mapped to a `cir.struct` and any object in
----------------
erichkeane wrote:
So this is actually a bit confusing/awkward. A RecordDecl can represent a 'union' as well as a 'class' or 'struct' type.
So I question the name of it here.
https://github.com/llvm/llvm-project/pull/135105
More information about the cfe-commits
mailing list