@@ -66,38 +66,6 @@ enum class DependencyScope : bool {
66
66
Cascading = true ,
67
67
};
68
68
69
- // / Returns a \c DependencyScope appropriate for the given (formal) access level.
70
- // /
71
- // / :warning: This function exists to bridge the old manual reference
72
- // / dependencies code to the new evaluator-based reference dependencies code.
73
- // / The manual code often made private/cascading scope judgements based on the
74
- // / access level of a declaration. While this makes some sense intuitively, it
75
- // / does not necessarily capture an accurate picture of where real incremental
76
- // / dependencies lie. For example, references to formally private types can
77
- // / "escape" to contexts that have no reference to the private name if, say,
78
- // / the layout of that private type is taken into consideration by
79
- // / SILGen or IRGen in a separate file that references the declaration
80
- // / transitively. However, due to the density of the current dependency
81
- // / graph, redundancy in registered dependency edges, and the liberal use of
82
- // / cascading edges, we may be saved from the worst consequences of this
83
- // / modelling choice.
84
- // /
85
- // / The use of access-levels for dependency decisions is an anti-pattern that
86
- // / should be revisited once finer-grained dependencies are explored more
87
- // / thoroughly.
88
- inline DependencyScope getScopeForAccessLevel (AccessLevel l) {
89
- switch (l) {
90
- case AccessLevel::Private:
91
- case AccessLevel::FilePrivate:
92
- return DependencyScope::Private;
93
- case AccessLevel::Internal:
94
- case AccessLevel::Public:
95
- case AccessLevel::Open:
96
- return DependencyScope::Cascading;
97
- }
98
- llvm_unreachable (" invalid access level kind" );
99
- }
100
-
101
69
// A \c DependencySource is currently defined to be a parent source file and
102
70
// an associated dependency scope.
103
71
//
0 commit comments