Optionally emit errors from IntegerType factory functions.
Similarly to other types, introduce "get" and "getChecked" static member functions for IntegerType. The latter emits errors to the error handler registered with the MLIR context and returns a null type for the caller to handle errors gracefully. This deduplicates type consistency checks between the parser and the builder. Update the parser to call IntegerType::getChecked for error reporting instead of the builder that would simply assert. This CL completes the type system error emission refactoring: the parser now only emits syntax-related errors for types while type factory systems may emit type consistency errors. PiperOrigin-RevId: 221165207
Loading
Please sign in to comment