File tree Expand file tree Collapse file tree 2 files changed +24
-19
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 2 files changed +24
-19
lines changed Original file line number Diff line number Diff line change @@ -754,25 +754,32 @@ void RewriteSystem::dump(llvm::raw_ostream &out) const {
754
754
out << " - " << rule << " \n " ;
755
755
}
756
756
out << " }\n " ;
757
- out << " Relations: {\n " ;
758
- for (const auto &relation : Relations) {
759
- out << " - " << relation.first << " =>> " << relation.second << " \n " ;
757
+ if (!Relations.empty ()) {
758
+ out << " Relations: {\n " ;
759
+ for (const auto &relation : Relations) {
760
+ out << " - " << relation.first << " =>> " << relation.second << " \n " ;
761
+ }
762
+ out << " }\n " ;
760
763
}
761
- out << " }\n " ;
762
- out << " Type differences: {\n " ;
763
- for (const auto &difference : Differences) {
764
- difference.dump (out);
765
- out << " \n " ;
764
+ if (!Differences.empty ()) {
765
+ out << " Type differences: {\n " ;
766
+ for (const auto &difference : Differences) {
767
+ difference.dump (out);
768
+ out << " \n " ;
769
+ }
770
+ out << " }\n " ;
766
771
}
767
- out << " }\n " ;
768
- out << " Rewrite loops: {\n " ;
769
- for (const auto &loop : Loops) {
770
- if (loop.isDeleted ())
771
- continue ;
772
-
773
- out << " - " ;
774
- loop.dump (out, *this );
775
- out << " \n " ;
772
+ if (!Loops.empty ()) {
773
+ out << " Rewrite loops: {\n " ;
774
+ for (unsigned loopID : indices (Loops)) {
775
+ const auto &loop = Loops[loopID];
776
+ if (loop.isDeleted ())
777
+ continue ;
778
+
779
+ out << " - (#" << loopID << " ) " ;
780
+ loop.dump (out, *this );
781
+ out << " \n " ;
782
+ }
776
783
}
777
784
out << " }\n " ;
778
785
}
Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ struct MergeTest<G : P1a & P2a> {}
26
26
// CHECK: - τ_0_0.[P1a:T].[P2] => τ_0_0.[P1a:T]
27
27
// CHECK: - τ_0_0.[P1a:T].[P2:X] => τ_0_0.[P1a:T].[P1:X]
28
28
// CHECK: }
29
- // CHECK: Rewrite loops: {
30
- // CHECK: }
31
29
// CHECK: Property map: {
32
30
// CHECK: τ_0_0 => { conforms_to: [P1a P2a] }
33
31
// CHECK: τ_0_0.[P1a:T] => { conforms_to: [P1 P2] }
You can’t perform that action at this time.
0 commit comments