Skip to content

[embedded] Support withoutActuallyEscaping in Embedded Swift #78920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

kubamracek
Copy link
Contributor

We were missing swift_isEscapingClosureAtFileLocation in the Embedded Swift runtime.

rdar://143070738

@kubamracek
Copy link
Contributor Author

@swift-ci please test

}
return result
}

@_cdecl("swift_isEscapingClosureAtFileLocation")
public func swift_isEscapingClosureAtFileLocation(object: Builtin.RawPointer, filename: UnsafePointer<CChar>, filenameLength: Int32, line: Int32, column: Int32, verificationType: CUnsignedInt) -> Bool {
guard swift_isUniquelyReferenced_native(object: object) else {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will raise a fatal error when object is NULL, whereas the C++ implementation returns false in that case. I'm not sure if it actually matters in practice (is this ever called with NULL legitimately?) but it would probably be good to match them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, fixed!

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek enabled auto-merge January 28, 2025 16:27
@kubamracek kubamracek merged commit 53921e4 into swiftlang:main Jan 28, 2025
4 of 5 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