Add support for operands to the return instructions, enhance verifier to report errors through the diagnostics system when invoked by the parser.  It doesn't have perfect location info, but it is close enough to be testable.

PiperOrigin-RevId: 205534392
diff --git a/include/mlir/IR/Module.h b/include/mlir/IR/Module.h
index ccc832a..8401252 100644
--- a/include/mlir/IR/Module.h
+++ b/include/mlir/IR/Module.h
@@ -40,8 +40,9 @@
   std::vector<Function*> functionList;
 
   /// Perform (potentially expensive) checks of invariants, used to detect
-  /// compiler bugs.  This aborts on failure.
-  void verify() const;
+  /// compiler bugs.  On error, this fills in the string and return true,
+  /// or aborts if the string was not provided.
+  bool verify(std::string *errorResult = nullptr) const;
 
   void print(raw_ostream &os) const;
   void dump() const;