Implement a simple IR verifier, including support for custom ops adding their
own requirements.

PiperOrigin-RevId: 203497491
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index 897da80..dac3fa6 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -94,3 +94,10 @@
 
 ; -----
 
+cfgfunc @malformed_dim() {
+bb42:
+  "dim"(){index: "xyz"}  ; expected-error {{'dim' op requires an integer attribute named 'index'}}
+  return
+}
+
+; -----