[PATCH] D77509: [MLIR][NFC] Make AsmPrinter messages on null structures consistent
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 5 12:16:53 PDT 2020
bondhugula created this revision.
bondhugula added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.
Make AsmPrinter messages on null structures consistent: use <<NULL ...>>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77509
Files:
mlir/lib/IR/AsmPrinter.cpp
Index: mlir/lib/IR/AsmPrinter.cpp
===================================================================
--- mlir/lib/IR/AsmPrinter.cpp
+++ mlir/lib/IR/AsmPrinter.cpp
@@ -2289,8 +2289,8 @@
}
void AffineExpr::print(raw_ostream &os) const {
- if (expr == nullptr) {
- os << "null affine expr";
+ if (!expr) {
+ os << "<<NULL AFFINE EXPR>>";
return;
}
ModulePrinter(os).printAffineExpr(*this);
@@ -2302,8 +2302,8 @@
}
void AffineMap::print(raw_ostream &os) const {
- if (map == nullptr) {
- os << "null affine map";
+ if (!map) {
+ os << "<<NULL AFFINE MAP>>";
return;
}
ModulePrinter(os).printAffineMap(*this);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77509.255182.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200405/df440c8f/attachment.bin>
More information about the llvm-commits
mailing list