llvm-project/mlir/test/Target/LLVMIR/invalid-module.mlir
gitoleg 49b0014742
[mlir][llvm] adds an attribute for the module level assembly (#151318)
Adds support for the module level assembly in the LLVM IR dialect.

---------

Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>
2025-07-31 14:10:21 +02:00

17 lines
509 B
MLIR

// RUN: mlir-translate -verify-diagnostics -mlir-to-llvmir --no-implicit-module -split-input-file %s
// expected-error@below {{'llvm.func' op can not be translated to an LLVMIR module}}
llvm.func @foo() {
llvm.return
}
// -----
// expected-error@below {{expected an array attribute for a module level asm}}
module attributes {llvm.module_asm = "foo"} {}
// -----
// expected-error@below {{expected a string attribute for each entry of a module level asm}}
module attributes {llvm.module_asm = [42]} {}