@@ -579,7 +579,6 @@ class UsedDeclEnumerator {
579
579
void enumerateAllUses () {
580
580
auto &Ctx = SF->getASTContext ();
581
581
Ctx.evaluator .enumerateReferencesInFile (SF, [&](const auto &ref) {
582
- const auto cascades = false ;
583
582
std::string name = ref.name .userFacingName ().str ();
584
583
const auto *nominal = ref.subject ;
585
584
using Kind = evaluator::DependencyCollector::Reference::Kind;
@@ -589,19 +588,19 @@ class UsedDeclEnumerator {
589
588
case Kind::Tombstone:
590
589
llvm_unreachable (" Cannot enumerate dead reference!" );
591
590
case Kind::TopLevel:
592
- return enumerateUse<NodeKind::topLevel>(" " , name, cascades );
591
+ return enumerateUse<NodeKind::topLevel>(" " , name);
593
592
case Kind::Dynamic:
594
- return enumerateUse<NodeKind::dynamicLookup>(" " , name, cascades );
593
+ return enumerateUse<NodeKind::dynamicLookup>(" " , name);
595
594
case Kind::PotentialMember: {
596
595
std::string context = DependencyKey::computeContextForProvidedEntity<
597
596
NodeKind::potentialMember>(nominal);
598
- return enumerateUse<NodeKind::potentialMember>(context, " " , cascades );
597
+ return enumerateUse<NodeKind::potentialMember>(context, " " );
599
598
}
600
599
case Kind::UsedMember: {
601
600
std::string context =
602
601
DependencyKey::computeContextForProvidedEntity<NodeKind::member>(
603
602
nominal);
604
- return enumerateUse<NodeKind::member>(context, name, cascades );
603
+ return enumerateUse<NodeKind::member>(context, name);
605
604
}
606
605
}
607
606
});
@@ -611,11 +610,11 @@ class UsedDeclEnumerator {
611
610
612
611
private:
613
612
template <NodeKind kind>
614
- void enumerateUse (StringRef context, StringRef name, bool isCascadingUse ) {
613
+ void enumerateUse (StringRef context, StringRef name) {
615
614
// Assume that what is depended-upon is the interface
616
615
createDefUse (
617
616
DependencyKey (kind, DeclAspect::interface, context.str (), name.str ()),
618
- isCascadingUse ? sourceFileInterface : sourceFileImplementation);
617
+ sourceFileImplementation);
619
618
}
620
619
621
620
void enumerateNominalUses () {
@@ -634,14 +633,13 @@ class UsedDeclEnumerator {
634
633
std::string context =
635
634
DependencyKey::computeContextForProvidedEntity<NodeKind::nominal>(
636
635
subject);
637
- enumerateUse<NodeKind::nominal>(context, " " , /* isCascadingUse */ false );
636
+ enumerateUse<NodeKind::nominal>(context, " " );
638
637
});
639
638
}
640
639
641
640
void enumerateExternalUses () {
642
- // external dependencies always cascade
643
641
for (StringRef s : depTracker.getDependencies ())
644
- enumerateUse<NodeKind::externalDepend>(" " , s, true );
642
+ enumerateUse<NodeKind::externalDepend>(" " , s);
645
643
}
646
644
};
647
645
} // end namespace
0 commit comments