mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
RequirementMachine: Generating conformances prefers to delete non-explicit rules
This is a heuristic to ensure that conformance requirements remain in their original protocol if possible, when the protocol is part of a connected component consisting of multiple protocols.
This commit is contained in:
@@ -200,6 +200,11 @@ RequirementMachine::computeMinimalRequirements() {
|
||||
assert(Protos.size() > 0);
|
||||
System.minimizeRewriteSystem();
|
||||
|
||||
if (Dump) {
|
||||
llvm::dbgs() << "Minimized rewrite system:\n";
|
||||
dump(llvm::dbgs());
|
||||
}
|
||||
|
||||
auto rules = System.getMinimizedRules(Protos);
|
||||
|
||||
// Note that we build 'result' by iterating over 'Protos' rather than
|
||||
|
||||
Reference in New Issue
Block a user