Skip to content

Conversation

@kavon
Copy link
Member

@kavon kavon commented Oct 22, 2025

Now you can build and run programs that use property wrappers with -enable-sil-opaque-values.

resolves rdar://163071245

@kavon
Copy link
Member Author

kavon commented Oct 22, 2025

@swift-ci smoke test macOS

1 similar comment
@kavon
Copy link
Member Author

kavon commented Oct 22, 2025

@swift-ci smoke test macOS

@kavon kavon force-pushed the opaque-values/fixes-3 branch from 94734ab to a992f6e Compare October 22, 2025 23:34
@kavon kavon marked this pull request as ready for review October 22, 2025 23:34
@kavon kavon requested a review from nate-chandler October 22, 2025 23:34
@kavon
Copy link
Member Author

kavon commented Oct 22, 2025

@swift-ci test

}

/// WARNING: Do not use this from SILGen!
/// Use methods such as `isSILIndirect` or query the ParameterInfo instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the comment explain why not? :)

Copy link
Member Author

@kavon kavon Oct 23, 2025

Choose a reason for hiding this comment

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

It's a little hard to explain, but it's because SILFunctionConventions::isSILIndirect goes through the SILModuleConventions::isIndirectSILParam query, which correctly answers whether an argument is indirect. Similarly it will do that for SILResultInfo for indirect returns.

In the future, I'd like to revise SILFunctionConventions::getSILArgumentConvention , or possibly eliminate it. It was recently refactored in 65e2e8c and I don't think it's going in the right direction, as it's trying to think about results as if they are arguments, when the SILFunctionConventions use a type distinction between SILParameterInfo and SILResultInfo to help avoid confusion there.

@kavon kavon force-pushed the opaque-values/fixes-3 branch from a992f6e to 861c6e7 Compare October 23, 2025 17:07
@kavon
Copy link
Member Author

kavon commented Oct 23, 2025

@swift-ci smoke test

@kavon kavon enabled auto-merge October 23, 2025 17:08
@kavon kavon force-pushed the opaque-values/fixes-3 branch from 861c6e7 to 19bd65c Compare October 23, 2025 23:31
@kavon
Copy link
Member Author

kavon commented Oct 23, 2025

@swift-ci smoke test

@kavon kavon merged commit 38c61d7 into swiftlang:main Oct 24, 2025
3 checks passed
@kavon kavon deleted the opaque-values/fixes-3 branch October 25, 2025 00:10
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