================
@@ -2741,6 +2741,25 @@ LogicalResult cir::AtomicCmpXchg::verify() {
   return success();
 }
 
+//===----------------------------------------------------------------------===//
+// TypeInfoAttr
+//===----------------------------------------------------------------------===//
+
+LogicalResult cir::TypeInfoAttr::verify(
+    ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError,
+    ::mlir::Type type, ::mlir::ArrayAttr typeinfoData) {
+
+  if (cir::ConstRecordAttr::verify(emitError, type, typeinfoData).failed())
+    return failure();
+
+  for (auto &member : typeinfoData) {
+    if (llvm::isa<GlobalViewAttr, IntAttr>(member))
+      continue;
+    return emitError() << "expected GlobalViewAttr or IntAttr attribute";
+  }
----------------
xlauko wrote:

this can be chacked with `ArrayOfAttr` as constriant in the definition

https://github.com/llvm/llvm-project/pull/159426
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to