File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/AST/RequirementMachine Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,18 @@ void RequirementMachine::verify(const MutableTerm &term) const {
333
333
}
334
334
335
335
void RequirementMachine::dump (llvm::raw_ostream &out) const {
336
- out << " Requirement machine for " << Sig << " \n " ;
336
+ out << " Requirement machine for " ;
337
+ if (Sig)
338
+ out << Sig;
339
+ else {
340
+ out << " [" ;
341
+ for (auto *proto : Protos) {
342
+ out << " " << proto->getName ();
343
+ }
344
+ out << " ]" ;
345
+ }
346
+ out << " \n " ;
347
+
337
348
System.dump (out);
338
349
Map.dump (out);
339
350
@@ -394,6 +405,8 @@ void RequirementMachine::initWithGenericSignature(CanGenericSignature sig) {
394
405
}
395
406
396
407
void RequirementMachine::initWithProtocols (ArrayRef<const ProtocolDecl *> protos) {
408
+ Protos = protos;
409
+
397
410
auto &ctx = Context.getASTContext ();
398
411
auto *Stats = ctx.Stats ;
399
412
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class RequirementMachine final {
48
48
friend class swift ::rewriting::RewriteContext;
49
49
50
50
CanGenericSignature Sig;
51
+ ArrayRef<const ProtocolDecl *> Protos;
51
52
52
53
RewriteContext &Context;
53
54
RewriteSystem System;
You can’t perform that action at this time.
0 commit comments