llvm-capstone/mlir/test/IR/invalid-module-op.mlir
Mehdi Amini 387f95541b Add a new interface allowing to set a default dialect to be used for printing/parsing regions
Currently the builtin dialect is the default namespace used for parsing
and printing. As such module and func don't need to be prefixed.
In the case of some dialects that defines new regions for their own
purpose (like SpirV modules for example), it can be beneficial to
change the default dialect in order to improve readability.

Differential Revision: https://reviews.llvm.org/D107236
2021-08-31 17:52:40 +00:00

32 lines
551 B
MLIR

// RUN: mlir-opt %s -split-input-file -verify-diagnostics
// -----
func @module_op() {
// expected-error@+1 {{Operations with a 'SymbolTable' must have exactly one block}}
builtin.module {
^bb1:
"test.dummy"() : () -> ()
^bb2:
"test.dummy"() : () -> ()
}
return
}
// -----
func @module_op() {
// expected-error@+1 {{region should have no arguments}}
builtin.module {
^bb1(%arg: i32):
}
return
}
// -----
// expected-error@+1 {{can only contain attributes with dialect-prefixed names}}
module attributes {attr} {
}