[Mlir-commits] [mlir] [tblgen] Use `emitError` for inferResultTypes failures (PR #165488)
Jacques Pienaar
llvmlistbot at llvm.org
Tue Oct 28 21:00:27 PDT 2025
================
@@ -240,15 +240,12 @@ LogicalResult mlir::detail::verifyInferredResultTypes(Operation *op) {
return result;
}
-void mlir::detail::reportFatalInferReturnTypesError(OperationState &state) {
- std::string buffer;
- llvm::raw_string_ostream os(buffer);
- os << "Failed to infer result type(s):\n"
- << "\"" << state.name << "\"(...) "
- << state.attributes.getDictionary(state.location.getContext()) << " : ("
- << llvm::interleaved(llvm::map_range(
- state.operands, [](Value val) { return val.getType(); }))
- << ") -> ( ??? )";
- emitRemark(state.location, "location of op");
- llvm::report_fatal_error(llvm::StringRef(buffer));
+void mlir::detail::emitInferReturnTypesError(OperationState &state) {
+ mlir::emitError(state.location)
+ << "Failed to infer result type(s):\n"
----------------
jpienaar wrote:
LLVM/MLIR error convention style is sentence fragments (lower case start, no trailing period)
https://github.com/llvm/llvm-project/pull/165488
More information about the Mlir-commits
mailing list