[llvm] UTC: support debug output from LDist (PR #93208)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 11:35:54 PDT 2024
================
@@ -231,17 +231,16 @@ class InstPartition {
}
}
- void print() const {
- if (DepCycle)
- dbgs() << " (cycle)\n";
+ void print(raw_ostream &OS) const {
+ OS << (DepCycle ? " (cycle)\n" : "\n");
for (auto *I : Set)
// Prefix with the block name.
- dbgs() << " " << I->getParent()->getName() << ":" << *I << "\n";
+ OS << " " << I->getParent()->getName() << ":" << *I << "\n";
}
- void printBlocks() const {
+ void printBlocks(raw_ostream &OS) const {
----------------
fhahn wrote:
Thanks for checking, given that the existing `print() takes `OS` already, it make sense to pass it everywhere. (and also fixes inconsistent behavior when someone actually passes OS to the existing print)
https://github.com/llvm/llvm-project/pull/93208
More information about the llvm-commits
mailing list