[Mlir-commits] [mlir] [MLIR][LLVMIR] Add module flags support (PR #130679)
Tobias Gysi
llvmlistbot at llvm.org
Tue Mar 11 01:06:46 PDT 2025
================
@@ -270,6 +270,19 @@ static void convertLinkerOptionsOp(ArrayAttr options,
linkerMDNode->addOperand(listMDNode);
}
+static void convertModuleFlagsOp(ArrayAttr flags, llvm::IRBuilderBase &builder,
+ LLVM::ModuleTranslation &moduleTranslation) {
+ llvm::Module *llvmModule = moduleTranslation.getLLVMModule();
+ for (Attribute attr : flags) {
----------------
gysit wrote:
```suggestion
for (auto flagAttr : flags.getAsRange<ModuleFlagAttr>()) {
```
should avoid the cast on the next line
https://github.com/llvm/llvm-project/pull/130679
More information about the Mlir-commits
mailing list