@@ -335,7 +335,7 @@ SILInstruction *AnalysisInfo::findNonisolatedBlame(SILInstruction* startInst) {
335335 llvm_unreachable (" failed to find nonisolated blame." );
336336}
337337
338- ValueDecl *findCallee (ApplySite &apply) {
338+ static ValueDecl *findCallee (ApplySite &apply) {
339339 SILValue callee = apply.getCalleeOrigin ();
340340
341341 auto check = [](ValueDecl *decl) -> ValueDecl* {
@@ -359,7 +359,7 @@ ValueDecl *findCallee(ApplySite &apply) {
359359 return nullptr ;
360360}
361361
362- StringRef verbForInvoking (ValueDecl *value) {
362+ static StringRef verbForInvoking (ValueDecl *value) {
363363 // Only computed properties need a different verb.
364364 if (isa<AbstractStorageDecl>(value))
365365 return " accessing " ;
@@ -371,7 +371,7 @@ StringRef verbForInvoking(ValueDecl *value) {
371371// / introducing non-isolation, this function produces the values needed
372372// / to describe it to the user. Thus, the implementation of this function is
373373// / closely tied to that diagnostic.
374- std::tuple<StringRef, StringRef, DeclName>
374+ static std::tuple<StringRef, StringRef, DeclName>
375375describe (SILInstruction *blame) {
376376 auto &ctx = blame->getModule ().getASTContext ();
377377
@@ -385,21 +385,21 @@ describe(SILInstruction *blame) {
385385
386386 // if we have no callee info, all we know is it's a call involving self.
387387 if (!callee)
388- return { " a call involving" , " " , ctx.Id_self } ;
388+ return std::make_tuple ( " a call involving" , " " , ctx.Id_self ) ;
389389
390- return {
390+ return std::make_tuple (
391391 verbForInvoking (callee),
392392 callee->getDescriptiveKindName (callee->getDescriptiveKind ()),
393393 callee->getName ()
394- } ;
394+ ) ;
395395 }
396396
397397 // handle non-call blames
398398 switch (blame->getKind ()) {
399399 case SILInstructionKind::CopyValueInst:
400- return { " making a copy of" , " " , ctx.Id_self } ;
400+ return std::make_tuple ( " making a copy of" , " " , ctx.Id_self ) ;
401401 default :
402- return { " this use of" , " " , ctx.Id_self } ;
402+ return std::make_tuple ( " this use of" , " " , ctx.Id_self ) ;
403403 }
404404}
405405
0 commit comments