================
@@ -78,4 +78,48 @@ namespace cir {
#define GET_TYPEDEF_CLASSES
#include "clang/CIR/Dialect/IR/CIROpsTypes.h.inc"
+namespace cir {
+
+/// C++ view class for CIR struct/class record types.
+///
+/// Provides a type-safe handle for records with `RecordKind::Struct` or
+/// `RecordKind::Class`. Use `mlir::dyn_cast<StructType>` or
+/// `mlir::isa<StructType>` in place of `recordTy.isStruct()` checks.
+class StructType : public RecordType {
----------------
erichkeane wrote:
If we were splitting it, it would be in 2. One that does Struct + class (since
they have irrelevant differences), 1 that does union.
Presumably they could still share the RecordTypeStorage, so that shouldn't be a
problem.
That said, doesn't our TD file format for CIRTypes.td support inheritance?
https://github.com/llvm/llvm-project/pull/199790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits