@@ -2692,7 +2692,6 @@ getRepresentativeAccessorForKeyPath(AbstractStorageDecl *storage) {
26922692}
26932693
26942694static SILFunction *getOrCreateKeyPathGetter (SILGenModule &SGM,
2695- SILLocation loc,
26962695 AbstractStorageDecl *property,
26972696 SubstitutionMap subs,
26982697 GenericEnvironment *genericEnv,
@@ -2759,6 +2758,8 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
27592758 auto name = Mangle::ASTMangler ()
27602759 .mangleKeyPathGetterThunkHelper (property, genericSig, baseType,
27612760 subs, expansion);
2761+ auto loc = RegularLocation::getAutoGeneratedLocation ();
2762+
27622763 SILGenFunctionBuilder builder (SGM);
27632764 auto thunk = builder.getOrCreateSharedFunction (
27642765 loc, name, signature, IsBare, IsNotTransparent,
@@ -2806,7 +2807,6 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
28062807 auto baseSubstValue = emitKeyPathRValueBase (subSGF, property,
28072808 loc, baseArg,
28082809 baseType, subs);
2809-
28102810 auto subscriptIndices =
28112811 loadIndexValuesForKeyPathComponent (subSGF, loc, property,
28122812 indexes, indexPtrArg);
@@ -2832,7 +2832,6 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
28322832}
28332833
28342834static SILFunction *getOrCreateKeyPathSetter (SILGenModule &SGM,
2835- SILLocation loc,
28362835 AbstractStorageDecl *property,
28372836 SubstitutionMap subs,
28382837 GenericEnvironment *genericEnv,
@@ -2907,6 +2906,7 @@ static SILFunction *getOrCreateKeyPathSetter(SILGenModule &SGM,
29072906 auto name = Mangle::ASTMangler ()
29082907 .mangleKeyPathSetterThunkHelper (property, genericSig, baseType,
29092908 subs, expansion);
2909+ auto loc = RegularLocation::getAutoGeneratedLocation ();
29102910
29112911 SILGenFunctionBuilder builder (SGM);
29122912 auto thunk = builder.getOrCreateSharedFunction (
@@ -3536,13 +3536,13 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
35363536 // expected by the key path runtime.
35373537 auto id = getIdForKeyPathComponentComputedProperty (*this , var,
35383538 strategy);
3539- auto getter = getOrCreateKeyPathGetter (*this , loc,
3539+ auto getter = getOrCreateKeyPathGetter (*this ,
35403540 var, subs,
35413541 needsGenericContext ? genericEnv : nullptr ,
35423542 expansion, {}, baseTy, componentTy);
35433543
35443544 if (isSettableInComponent ()) {
3545- auto setter = getOrCreateKeyPathSetter (*this , loc,
3545+ auto setter = getOrCreateKeyPathSetter (*this ,
35463546 var, subs,
35473547 needsGenericContext ? genericEnv : nullptr ,
35483548 expansion, {}, baseTy, componentTy);
@@ -3587,7 +3587,7 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
35873587 }
35883588
35893589 auto id = getIdForKeyPathComponentComputedProperty (*this , decl, strategy);
3590- auto getter = getOrCreateKeyPathGetter (*this , loc,
3590+ auto getter = getOrCreateKeyPathGetter (*this ,
35913591 decl, subs,
35923592 needsGenericContext ? genericEnv : nullptr ,
35933593 expansion,
@@ -3596,7 +3596,7 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
35963596
35973597 auto indexPatternsCopy = getASTContext ().AllocateCopy (indexPatterns);
35983598 if (isSettableInComponent ()) {
3599- auto setter = getOrCreateKeyPathSetter (*this , loc,
3599+ auto setter = getOrCreateKeyPathSetter (*this ,
36003600 decl, subs,
36013601 needsGenericContext ? genericEnv : nullptr ,
36023602 expansion,
0 commit comments