[Mlir-commits] [mlir] [MLIR][LLVMIR] Add module flags support (PR #130679)
Henrich Lauko
llvmlistbot at llvm.org
Tue Mar 11 01:18:47 PDT 2025
================
@@ -3711,6 +3711,21 @@ LogicalResult LinkerOptionsOp::verify() {
return success();
}
+//===----------------------------------------------------------------------===//
+// ModuleFlagsOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult ModuleFlagsOp::verify() {
+ if (mlir::Operation *parentOp = (*this)->getParentOp();
+ parentOp && !satisfiesLLVMModule(parentOp))
+ return emitOpError("must appear at the module level");
+ for (auto &flag : getFlags()) {
----------------
xlauko wrote:
```suggestion
for (Attribute flag : getFlags()) {
```
https://github.com/llvm/llvm-project/pull/130679
More information about the Mlir-commits
mailing list