File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ bool ValueBase::isBorrowAccessorResult() const {
210
210
auto *apply = dyn_cast_or_null<ApplyInst>(getDefiningInstruction ());
211
211
if (!apply)
212
212
return false ;
213
- return apply->hasGuaranteedResult ();
213
+ return apply->hasGuaranteedResult () || apply-> hasGuaranteedAddressResult () ;
214
214
}
215
215
216
216
bool ValueBase::hasDebugTrace () const {
Original file line number Diff line number Diff line change @@ -599,6 +599,17 @@ SILValue VariableNameInferrer::findDebugInfoProvidingValueHelper(
599
599
}
600
600
}
601
601
602
+ // Borrow/mutate accessor
603
+ if (searchValue->isBorrowAccessorResult ()) {
604
+ if (auto fas =
605
+ FullApplySite::isa (searchValue->getDefiningInstruction ())) {
606
+ if (auto selfParam = getNamePathComponentFromCallee (fas)) {
607
+ searchValue = selfParam;
608
+ continue ;
609
+ }
610
+ }
611
+ }
612
+
602
613
// Addressor accessor.
603
614
if (auto ptrToAddr =
604
615
dyn_cast<PointerToAddressInst>(stripAccessMarkers (searchValue))) {
You can’t perform that action at this time.
0 commit comments