[PATCH] D71878: [NFC][LoopFusion] Fix printing of the guard branch.
Whitney Tsang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 25 09:55:54 PST 2019
Whitney created this revision.
Whitney added reviewers: kbarton, jdoerfert.
Whitney added a project: LLVM.
Herald added subscribers: llvm-commits, hiraditya.
getName() of a BranchInst is the empty string, because it doesn't have a return value.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71878
Files:
llvm/lib/Transforms/Scalar/LoopFuse.cpp
Index: llvm/lib/Transforms/Scalar/LoopFuse.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -257,8 +257,12 @@
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void dump() const {
- dbgs() << "\tGuardBranch: "
- << (GuardBranch ? GuardBranch->getName() : "nullptr") << "\n"
+ dbgs() << "\tGuardBranch: ";
+ if (GuardBranch)
+ dbgs() << *GuardBranch;
+ else
+ dbgs() << "nullptr";
+ dbgs() << "\n"
<< "\tPreheader: " << (Preheader ? Preheader->getName() : "nullptr")
<< "\n"
<< "\tHeader: " << (Header ? Header->getName() : "nullptr") << "\n"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71878.235288.patch
Type: text/x-patch
Size: 750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191225/3ff8d875/attachment.bin>
More information about the llvm-commits
mailing list