Skip to content

Conversation

@kavon
Copy link
Member

@kavon kavon commented Oct 24, 2025

We were reusing the SILLocation from return instructions to generate projections to ultimately destroy values.

This fix improves on what we were doing before, by converting the insertion point's SILLocation into a RegularLocation without dropping the source location.

If the SILLocation was tied to an ASTNode, it'll carry over the line location for this new regular location. Otherwise, it'll fallback to the prior strategy of producing a line 0 autogenerated location.

resolves rdar://163281183

We were reusing the SILLocation from return instructions
to generate projections to ultimately destroy values.

This fix improves on what we were doing before, by
converting the insertion point's SILLocation into a
RegularLocation _without dropping_ the source location.

If the SILLocation was tied to an ASTNode, it'll carry
over the line location for this new regular location.
Otherwise, it'll fallback to the prior strategy of
producing a line 0 autogenerated location.

resolves rdar://163281183
@kavon kavon requested a review from jckarter as a code owner October 24, 2025 18:58
@kavon
Copy link
Member Author

kavon commented Oct 24, 2025

@swift-ci smoke test

@tbkka
Copy link
Contributor

tbkka commented Oct 24, 2025

CC: @aidan-hall

@kavon kavon enabled auto-merge October 25, 2025 00:08
@kavon kavon merged commit 0849b2e into swiftlang:main Oct 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants