@@ -1042,26 +1042,26 @@ static SILInstruction *isSuperInitUse(UpcastInst *Inst) {
1042
1042
// "Inst" is an Upcast instruction. Check to see if it is used by an apply
1043
1043
// that came from a call to super.init.
1044
1044
for (auto UI : Inst->getUses ()) {
1045
- auto *inst = UI->getUser ();
1045
+ auto *User = UI->getUser ();
1046
1046
// If this used by another upcast instruction, recursively handle it, we may
1047
1047
// have a multiple upcast chain.
1048
- if (auto *UCIU = dyn_cast<UpcastInst>(inst ))
1048
+ if (auto *UCIU = dyn_cast<UpcastInst>(User ))
1049
1049
if (auto *subAI = isSuperInitUse (UCIU))
1050
1050
return subAI;
1051
1051
1052
1052
// The call to super.init has to either be an apply or a try_apply.
1053
- if (!isa<FullApplySite>(inst ))
1053
+ if (!isa<FullApplySite>(User ))
1054
1054
continue ;
1055
1055
1056
- auto *LocExpr = inst ->getLoc ().getAsASTNode <ApplyExpr>();
1056
+ auto *LocExpr = User ->getLoc ().getAsASTNode <ApplyExpr>();
1057
1057
if (!LocExpr) {
1058
1058
// If we're reading a .sil file, treat a call to "superinit" as a
1059
1059
// super.init call as a hack to allow us to write testcases.
1060
- auto *AI = dyn_cast<ApplyInst>(inst );
1061
- if (AI && inst ->getLoc ().isSILFile ())
1060
+ auto *AI = dyn_cast<ApplyInst>(User );
1061
+ if (AI && User ->getLoc ().isSILFile ())
1062
1062
if (auto *Fn = AI->getReferencedFunction ())
1063
1063
if (Fn->getName () == " superinit" )
1064
- return inst ;
1064
+ return User ;
1065
1065
continue ;
1066
1066
}
1067
1067
@@ -1076,7 +1076,7 @@ static SILInstruction *isSuperInitUse(UpcastInst *Inst) {
1076
1076
continue ;
1077
1077
1078
1078
if (LocExpr->getArg ()->isSuperExpr ())
1079
- return inst ;
1079
+ return User ;
1080
1080
1081
1081
// Instead of super_ref_expr, we can also get this for inherited delegating
1082
1082
// initializers:
@@ -1087,7 +1087,7 @@ static SILInstruction *isSuperInitUse(UpcastInst *Inst) {
1087
1087
if (auto *DRE = dyn_cast<DeclRefExpr>(DTB->getSubExpr ()))
1088
1088
if (DRE->getDecl ()->isImplicit () &&
1089
1089
DRE->getDecl ()->getName ().str () == " self" )
1090
- return inst ;
1090
+ return User ;
1091
1091
}
1092
1092
1093
1093
return nullptr ;
0 commit comments