Skip to content

Commit 7de1d9b

Browse files
committed
RequirementMachine: Better debug output
1 parent 399a600 commit 7de1d9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/AST/RequirementMachine/RewriteSystem.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ bool RewriteSystem::addRule(MutableTerm lhs, MutableTerm rhs) {
6262
assert(!lhs.empty());
6363
assert(!rhs.empty());
6464

65+
if (Debug.contains(DebugFlags::Add)) {
66+
llvm::dbgs() << "# Adding rule " << lhs << " == " << rhs << "\n";
67+
}
68+
6569
// First, simplify terms appearing inside concrete substitutions before
6670
// doing anything else.
6771
if (lhs.back().isSuperclassOrConcreteType())
@@ -89,7 +93,7 @@ bool RewriteSystem::addRule(MutableTerm lhs, MutableTerm rhs) {
8993
assert(lhs.compare(rhs, Protos) > 0);
9094

9195
if (Debug.contains(DebugFlags::Add)) {
92-
llvm::dbgs() << "# Adding rule " << lhs << " => " << rhs << "\n";
96+
llvm::dbgs() << "## Simplified and oriented rule " << lhs << " => " << rhs << "\n\n";
9397
}
9498

9599
unsigned i = Rules.size();

0 commit comments

Comments
 (0)