diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp --- a/mlir/lib/IR/Operation.cpp +++ b/mlir/lib/IR/Operation.cpp @@ -174,6 +174,9 @@ resultType = resultTypes.front(); else resultType = TupleType::get(resultTypes, location->getContext()); + if (!resultType) + llvm::report_fatal_error( + "Building an Operation with invalid/empty result Type"); } }