================
@@ -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";
+ }
----------------
AmrDeveloper wrote:
I did it, it was very nice to learn how to do it, thanks 👍🏻
https://github.com/llvm/llvm-project/pull/159426
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits