================
@@ -3621,6 +3621,26 @@ OpFoldResult cir::NotOp::fold(FoldAdaptor adaptor) {
return {};
}
+//===----------------------------------------------------------------------===//
+// BaseClassAddrOp & DerivedClassAddrOp
+//===----------------------------------------------------------------------===//
+
+static LogicalResult verifyClassAddrCast(Operation *op, cir::PointerType srcTy,
+ cir::PointerType resultTy) {
+ if (srcTy.getAddrSpace() != resultTy.getAddrSpace())
+ return op->emitOpError() << "address space mismatch";
+
+ return mlir::success();
+}
----------------
steffenlarsen wrote:
I'm not sure I'm convinced this function adds much simplicity to this. Plenty
of other places makes a similar check.
https://github.com/llvm/llvm-project/pull/230841
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits