@@ -2692,7 +2692,6 @@ getRepresentativeAccessorForKeyPath(AbstractStorageDecl *storage) {
2692
2692
}
2693
2693
2694
2694
static SILFunction *getOrCreateKeyPathGetter (SILGenModule &SGM,
2695
- SILLocation loc,
2696
2695
AbstractStorageDecl *property,
2697
2696
SubstitutionMap subs,
2698
2697
GenericEnvironment *genericEnv,
@@ -2759,6 +2758,8 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
2759
2758
auto name = Mangle::ASTMangler ()
2760
2759
.mangleKeyPathGetterThunkHelper (property, genericSig, baseType,
2761
2760
subs, expansion);
2761
+ auto loc = RegularLocation::getAutoGeneratedLocation ();
2762
+
2762
2763
SILGenFunctionBuilder builder (SGM);
2763
2764
auto thunk = builder.getOrCreateSharedFunction (
2764
2765
loc, name, signature, IsBare, IsNotTransparent,
@@ -2806,7 +2807,6 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
2806
2807
auto baseSubstValue = emitKeyPathRValueBase (subSGF, property,
2807
2808
loc, baseArg,
2808
2809
baseType, subs);
2809
-
2810
2810
auto subscriptIndices =
2811
2811
loadIndexValuesForKeyPathComponent (subSGF, loc, property,
2812
2812
indexes, indexPtrArg);
@@ -2832,7 +2832,6 @@ static SILFunction *getOrCreateKeyPathGetter(SILGenModule &SGM,
2832
2832
}
2833
2833
2834
2834
static SILFunction *getOrCreateKeyPathSetter (SILGenModule &SGM,
2835
- SILLocation loc,
2836
2835
AbstractStorageDecl *property,
2837
2836
SubstitutionMap subs,
2838
2837
GenericEnvironment *genericEnv,
@@ -2907,6 +2906,7 @@ static SILFunction *getOrCreateKeyPathSetter(SILGenModule &SGM,
2907
2906
auto name = Mangle::ASTMangler ()
2908
2907
.mangleKeyPathSetterThunkHelper (property, genericSig, baseType,
2909
2908
subs, expansion);
2909
+ auto loc = RegularLocation::getAutoGeneratedLocation ();
2910
2910
2911
2911
SILGenFunctionBuilder builder (SGM);
2912
2912
auto thunk = builder.getOrCreateSharedFunction (
@@ -3536,13 +3536,13 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
3536
3536
// expected by the key path runtime.
3537
3537
auto id = getIdForKeyPathComponentComputedProperty (*this , var,
3538
3538
strategy);
3539
- auto getter = getOrCreateKeyPathGetter (*this , loc,
3539
+ auto getter = getOrCreateKeyPathGetter (*this ,
3540
3540
var, subs,
3541
3541
needsGenericContext ? genericEnv : nullptr ,
3542
3542
expansion, {}, baseTy, componentTy);
3543
3543
3544
3544
if (isSettableInComponent ()) {
3545
- auto setter = getOrCreateKeyPathSetter (*this , loc,
3545
+ auto setter = getOrCreateKeyPathSetter (*this ,
3546
3546
var, subs,
3547
3547
needsGenericContext ? genericEnv : nullptr ,
3548
3548
expansion, {}, baseTy, componentTy);
@@ -3587,7 +3587,7 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
3587
3587
}
3588
3588
3589
3589
auto id = getIdForKeyPathComponentComputedProperty (*this , decl, strategy);
3590
- auto getter = getOrCreateKeyPathGetter (*this , loc,
3590
+ auto getter = getOrCreateKeyPathGetter (*this ,
3591
3591
decl, subs,
3592
3592
needsGenericContext ? genericEnv : nullptr ,
3593
3593
expansion,
@@ -3596,7 +3596,7 @@ SILGenModule::emitKeyPathComponentForDecl(SILLocation loc,
3596
3596
3597
3597
auto indexPatternsCopy = getASTContext ().AllocateCopy (indexPatterns);
3598
3598
if (isSettableInComponent ()) {
3599
- auto setter = getOrCreateKeyPathSetter (*this , loc,
3599
+ auto setter = getOrCreateKeyPathSetter (*this ,
3600
3600
decl, subs,
3601
3601
needsGenericContext ? genericEnv : nullptr ,
3602
3602
expansion,
0 commit comments