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 @@ -2359,16 +2359,18 @@ if (auto *op = getDefiningOp()) return op->print(os); // TODO: Improve this. - assert(isa()); - os << "\n"; + BlockArgument arg = this->cast(); + os << " of type '" << arg.getType() + << "' at index: " << arg.getArgNumber() << '\n'; } void Value::print(raw_ostream &os, AsmState &state) { if (auto *op = getDefiningOp()) return op->print(os, state); // TODO: Improve this. - assert(isa()); - os << "\n"; + BlockArgument arg = this->cast(); + os << " of type '" << arg.getType() + << "' at index: " << arg.getArgNumber() << '\n'; } void Value::dump() {