[Mlir-commits] [mlir] [tblgen] Use `emitError` for inferResultTypes failures (PR #165488)
Stef Lindall
llvmlistbot at llvm.org
Wed Oct 29 11:45:57 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"
----------------
bethebunny wrote:
Fixed. Also updated the other usage in `genInferredTypeCollectiveParamBuilder` to call this function, which had the same casing.
https://github.com/llvm/llvm-project/pull/165488
More information about the Mlir-commits
mailing list