[clang] [CIR] Upstream minimal support for structure types (PR #135105)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 14 00:28:37 PDT 2025


================
@@ -67,6 +72,166 @@ void CIRDialect::printType(Type type, DialectAsmPrinter &os) const {
   llvm::report_fatal_error("printer is missing a handler for this type");
 }
 
+//===----------------------------------------------------------------------===//
+// RecordType Definitions
+//===----------------------------------------------------------------------===//
+
+Type RecordType::parse(mlir::AsmParser &parser) {
+  FailureOr<AsmParser::CyclicParseReset> cyclicParseGuard;
+  const auto loc = parser.getCurrentLocation();
+  const auto eLoc = parser.getEncodedSourceLoc(loc);
+  RecordKind kind;
+  auto *context = parser.getContext();
----------------
xlauko wrote:

```suggestion
  MLIRContext *context = parser.getContext();
```

https://github.com/llvm/llvm-project/pull/135105


More information about the cfe-commits mailing list