[Mlir-commits] [mlir] [mlir][llvm] adds an attribute for the module level assembly (PR #151318)

Tobias Gysi llvmlistbot at llvm.org
Thu Jul 31 04:17:27 PDT 2025


================
@@ -1063,6 +1064,18 @@ void ModuleImport::convertTargetTriple() {
       builder.getStringAttr(llvmModule->getTargetTriple().str()));
 }
 
+void ModuleImport::convertModuleLevelAsm() {
+  auto str = llvmModule->getModuleInlineAsm();
+  llvm::SmallVector<mlir::Attribute> arr;
+
+  for (auto line : llvm::split(str, '\n'))
----------------
gysit wrote:

```suggestion
  for (llvm::StringRef asmLine : llvm::split(asmStr, '\n'))
```
nit: Let's avoid auto as well.

https://github.com/llvm/llvm-project/pull/151318


More information about the Mlir-commits mailing list