mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
387f95541b
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
32 lines
551 B
MLIR
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} {
|
|
}
|
|
|