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 @@ -935,7 +935,7 @@ void SSANameState::printValueID(Value value, bool printResultNo, raw_ostream &stream) const { if (!value) { - stream << "<>"; + stream << "<>"; return; } @@ -2826,6 +2826,11 @@ } void Value::print(raw_ostream &os) { + if (!impl) { + os << "<>"; + return; + } + if (auto *op = getDefiningOp()) return op->print(os); // TODO: Improve BlockArgument print'ing. @@ -2834,6 +2839,11 @@ << "' at index: " << arg.getArgNumber(); } void Value::print(raw_ostream &os, AsmState &state) { + if (!impl) { + os << "<>"; + return; + } + if (auto *op = getDefiningOp()) return op->print(os, state);