Even if this indicates in general a problem at call sites, the printer
is used for debugging and avoiding crashing is friendlier for example
when used in diagnostics or other printer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
1494 | This change is very welcome, thanks! It would be good keep the message format consistent though - there are other places in the ASM printer that handle such null structures. Can we make the casing and angular brackets uniform? (changing to your format sounds good). if (!value) { stream << "<<NULL>>"; return; } if (!attr) { os << "<<NULL ATTRIBUTE>>"; return; } void AffineExpr::print(raw_ostream &os) const { if (expr == nullptr) { os << "null affine expr"; return; } void AffineExpr::dump() const { print(llvm::errs()); llvm::errs() << "\n"; } void AffineMap::print(raw_ostream &os) const { if (map == nullptr) { os << "null affine map"; return; } ModulePrinter(os).printAffineMap(*this); } |
This change is very welcome, thanks! It would be good keep the message format consistent though - there are other places in the ASM printer that handle such null structures. Can we make the casing and angular brackets uniform? (changing to your format sounds good).