Adds support for the module level assembly in the LLVM IR dialect. --------- Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>
17 lines
509 B
MLIR
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]} {}
|