Skip to content

Conversation

kavon
Copy link
Member

@kavon kavon commented Oct 7, 2025

Out of SILGen, we'll get the non-indirect SSA for throwing
the error. AddressLowering then converts a throw into
throw_addr to match the function convention. Similarly, a
try_apply gets rewritten to pass the error address to the
error successor block.

resolves rdar://158171053


TODOs

  • Write regression tests for AddressLowering.

kavon added 2 commits October 7, 2025 09:27
We use a direct @error emission style when opaque values
is enabled, relying on AddressLowering to satisfy the
formal @error_indirect convention.
@kavon kavon requested a review from jckarter as a code owner October 7, 2025 16:34
@kavon kavon requested a review from nate-chandler October 7, 2025 16:34
@kavon
Copy link
Member Author

kavon commented Oct 7, 2025

@swift-ci smoke test

Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kavon added 2 commits October 8, 2025 15:59
Out of SILGen, we'll get the non-indirect SSA for throwing
the error. AddressLowering then converts a `throw` into
`throw_addr` to match the function convention. Similarly, a
try_apply gets rewritten to pass the error address to the
error successor block.

resolves rdar://158171053
@kavon kavon force-pushed the opaque-values/fixes-2 branch from 2eead0a to 37eafa9 Compare October 8, 2025 22:59
@kavon kavon requested a review from eeckstein as a code owner October 8, 2025 22:59
@kavon
Copy link
Member Author

kavon commented Oct 8, 2025

@swift-ci smoke test

@kavon kavon enabled auto-merge October 8, 2025 23:03
@kavon kavon merged commit a528c5c into swiftlang:main Oct 9, 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.

2 participants