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 {
210210 auto *apply = dyn_cast_or_null<ApplyInst>(getDefiningInstruction ());
211211 if (!apply)
212212 return false ;
213- return apply->hasGuaranteedResult ();
213+ return apply->hasGuaranteedResult () || apply-> hasGuaranteedAddressResult () ;
214214}
215215
216216bool ValueBase::hasDebugTrace () const {
Original file line number Diff line number Diff line change @@ -599,6 +599,17 @@ SILValue VariableNameInferrer::findDebugInfoProvidingValueHelper(
599599 }
600600 }
601601
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+
602613 // Addressor accessor.
603614 if (auto ptrToAddr =
604615 dyn_cast<PointerToAddressInst>(stripAccessMarkers (searchValue))) {
You can’t perform that action at this time.
0 commit comments