Initial support for operands and results and SSA constructs, first on
the instruction side of the house.
This has a number of limitations, including that we are still dropping
operands on the floor in the parser. Also, most of the convenience methods
aren't wired up yet. This is enough to get result type lists round tripping
through.
PiperOrigin-RevId: 205148223
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index 7efff5b..98f4aaf 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -110,10 +110,17 @@
// -----
+cfgfunc @bad_op_type() {
+bb40:
+ "foo"() : i32 // expected-error {{expected function type}}
+ return
+}
+// -----
+
cfgfunc @no_terminator() {
bb40:
- "foo"()
- ""() // expected-error {{empty operation name is invalid}}
+ "foo"() : ()->()
+ ""() : ()->() // expected-error {{empty operation name is invalid}}
return
}
@@ -137,7 +144,7 @@
cfgfunc @malformed_dim() {
bb42:
- "dim"(){index: "xyz"} // expected-error {{'dim' op requires an integer attribute named 'index'}}
+ "dim"(){index: "xyz"} : ()->i32 // expected-error {{'dim' op requires an integer attribute named 'index'}}
return
}