@@ -237,19 +237,17 @@ class SILType {
237237 // / This is equivalent to, but possibly faster than, calling
238238 // / M.Types.getTypeLowering(type).isReturnedIndirectly().
239239 static bool isFormallyReturnedIndirectly (CanType type, SILModule &M,
240- CanGenericSignature Sig,
241- ResilienceExpansion Expansion) {
242- return isAddressOnly (type, M, Sig, Expansion);
240+ CanGenericSignature Sig) {
241+ return isAddressOnly (type, M, Sig, ResilienceExpansion::Minimal);
243242 }
244243
245244 // / Return true if this type must be passed indirectly.
246245 // /
247246 // / This is equivalent to, but possibly faster than, calling
248247 // / M.Types.getTypeLowering(type).isPassedIndirectly().
249248 static bool isFormallyPassedIndirectly (CanType type, SILModule &M,
250- CanGenericSignature Sig,
251- ResilienceExpansion Expansion) {
252- return isAddressOnly (type, M, Sig, Expansion);
249+ CanGenericSignature Sig) {
250+ return isAddressOnly (type, M, Sig, ResilienceExpansion::Minimal);
253251 }
254252
255253 // / True if the type, or the referenced type of an address type, is loadable.
@@ -265,8 +263,8 @@ class SILType {
265263 // / be loadable inside a resilient function in the module.
266264 // / In other words: isLoadable(SILModule) is the conservative default, whereas
267265 // / isLoadable(SILFunction) might give a more optimistic result.
268- bool isLoadable (SILFunction *inFunction ) const {
269- return !isAddressOnly (inFunction );
266+ bool isLoadable (const SILFunction &F ) const {
267+ return !isAddressOnly (F );
270268 }
271269
272270 // / True if either:
@@ -275,20 +273,24 @@ class SILType {
275273 bool isLoadableOrOpaque (SILModule &M) const ;
276274
277275 // / Like isLoadableOrOpaque(SILModule), but takes the resilience expansion of
278- // / \p inFunction into account (see isLoadable(SILFunction)).
279- bool isLoadableOrOpaque (SILFunction *inFunction ) const ;
276+ // / \p F into account (see isLoadable(SILFunction)).
277+ bool isLoadableOrOpaque (const SILFunction &F ) const ;
280278
281279 // / True if the type, or the referenced type of an address type, is
282280 // / address-only. This is the opposite of isLoadable.
283281 bool isAddressOnly (SILModule &M) const ;
284282
285283 // / Like isAddressOnly(SILModule), but takes the resilience expansion of
286- // / \p inFunction into account (see isLoadable(SILFunction)).
287- bool isAddressOnly (SILFunction *inFunction ) const ;
284+ // / \p F into account (see isLoadable(SILFunction)).
285+ bool isAddressOnly (const SILFunction &F ) const ;
288286
289287 // / True if the type, or the referenced type of an address type, is trivial.
290288 bool isTrivial (SILModule &M) const ;
291289
290+ // / Like isTrivial(SILModule), but takes the resilience expansion of
291+ // / \p F into account (see isLoadable(SILFunction)).
292+ bool isTrivial (const SILFunction &F) const ;
293+
292294 // / True if the type, or the referenced type of an address type, is known to
293295 // / be a scalar reference-counted type. If this is false, then some part of
294296 // / the type may be opaque. It may become reference counted later after
0 commit comments