[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:28 PDT 2025
================
@@ -1,6 +1,14 @@
-// RUN: mlir-translate -verify-diagnostics -mlir-to-llvmir --no-implicit-module %s
+// RUN: mlir-translate -verify-diagnostics -mlir-to-llvmir --no-implicit-module -split-input-file %s
// expected-error at below {{'llvm.func' op can not be translated to an LLVMIR module}}
llvm.func @foo() {
llvm.return
}
+
+// -----
+// expected-error at below {{expected an array attribute for a module level asm}}
+module attributes {llvm.module_asm = "foo"} {}
+
+// -----
+// expected-error at below {{expected a string attribute for each entry of a module level asm}}
+module attributes {llvm.module_asm = [42]} {}
----------------
gysit wrote:
```suggestion
// -----
// expected-error at below {{expected an array attribute for a module level asm}}
module attributes {llvm.module_asm = "foo"} {}
// -----
// expected-error at below {{expected a string attribute for each entry of a module level asm}}
module attributes {llvm.module_asm = [42]} {}
```
nit: let's add some extra newlines
https://github.com/llvm/llvm-project/pull/151318
More information about the Mlir-commits
mailing list