@@ -133,22 +133,26 @@ class LifetimeDependenceSpecifier {
133133class LifetimeDependenceInfo {
134134 IndexSubset *inheritLifetimeParamIndices;
135135 IndexSubset *scopeLifetimeParamIndices;
136- bool isExplicit;
137136
138137 static LifetimeDependenceInfo getForParamIndex (AbstractFunctionDecl *afd,
139138 unsigned index,
140139 LifetimeDependenceKind kind);
141140
141+ // / Builds LifetimeDependenceInfo from a swift decl
142+ static std::optional<LifetimeDependenceInfo>
143+ fromTypeRepr (AbstractFunctionDecl *afd);
144+
145+ // / Infer LifetimeDependenceInfo
146+ static std::optional<LifetimeDependenceInfo> infer (AbstractFunctionDecl *afd);
147+
142148public:
143149 LifetimeDependenceInfo ()
144150 : inheritLifetimeParamIndices(nullptr ),
145- scopeLifetimeParamIndices (nullptr ), isExplicit( false ) {}
151+ scopeLifetimeParamIndices (nullptr ) {}
146152 LifetimeDependenceInfo (IndexSubset *inheritLifetimeParamIndices,
147- IndexSubset *scopeLifetimeParamIndices,
148- bool isExplicit = false )
153+ IndexSubset *scopeLifetimeParamIndices)
149154 : inheritLifetimeParamIndices(inheritLifetimeParamIndices),
150- scopeLifetimeParamIndices(scopeLifetimeParamIndices),
151- isExplicit(isExplicit) {
155+ scopeLifetimeParamIndices(scopeLifetimeParamIndices) {
152156 assert (!empty ());
153157 assert (!inheritLifetimeParamIndices ||
154158 !inheritLifetimeParamIndices->isEmpty ());
@@ -162,8 +166,6 @@ class LifetimeDependenceInfo {
162166 scopeLifetimeParamIndices == nullptr ;
163167 }
164168
165- bool isExplicitlySpecified () const { return isExplicit; }
166-
167169 bool hasInheritLifetimeParamIndices () const {
168170 return inheritLifetimeParamIndices != nullptr ;
169171 }
@@ -191,27 +193,17 @@ class LifetimeDependenceInfo {
191193 // / Builds LifetimeDependenceInfo from a swift decl, either from the explicit
192194 // / lifetime dependence specifiers or by inference based on types and
193195 // / ownership modifiers.
194- static std::optional<LifetimeDependenceInfo>
195- get (AbstractFunctionDecl *decl, Type resultType, bool allowIndex = false );
196+ static std::optional<LifetimeDependenceInfo> get (AbstractFunctionDecl *decl);
196197
197198 // / Builds LifetimeDependenceInfo from the bitvectors passes as parameters.
198199 static LifetimeDependenceInfo
199200 get (ASTContext &ctx, const SmallBitVector &inheritLifetimeIndices,
200201 const SmallBitVector &scopeLifetimeIndices);
201202
202- // / Builds LifetimeDependenceInfo from a swift decl
203- static std::optional<LifetimeDependenceInfo>
204- fromTypeRepr (AbstractFunctionDecl *afd, Type resultType, bool allowIndex);
205-
206203 // / Builds LifetimeDependenceInfo from SIL
207204 static std::optional<LifetimeDependenceInfo>
208205 fromTypeRepr (LifetimeDependentReturnTypeRepr *lifetimeDependentRepr,
209- SmallVectorImpl<SILParameterInfo> ¶ms, bool hasSelfParam,
210- DeclContext *dc);
211-
212- // / Infer LifetimeDependenceInfo
213- static std::optional<LifetimeDependenceInfo> infer (AbstractFunctionDecl *afd,
214- Type resultType);
206+ SmallVectorImpl<SILParameterInfo> ¶ms, DeclContext *dc);
215207};
216208
217209} // namespace swift
0 commit comments