diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -1490,6 +1490,11 @@ } void ModulePrinter::printType(Type type) { + if (!type) { + os << "<>"; + return; + } + // Check for an alias for this type. if (state) { StringRef alias = state->getAliasState().getTypeAlias(type);