-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[IRGen] Don't call objc_retainAutoreleasedReturnValue() without interop. #72011
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
Conversation
@swift-ci Please smoke test |
@swift-ci test WebAssembly |
@swift-ci Please smoke test |
@swift-ci test WebAssembly |
8338d1f
to
a379ab8
Compare
a379ab8
to
0bed319
Compare
@swift-ci Please smoke test |
@swift-ci test WebAssembly |
0bed319
to
0f5358f
Compare
When ObjC interop is not enabled, we shouldn't be emitting calls to `objc_retainAutoreleasedReturnValue()` as that function might not exist. Call `swift_retain()` instead, to balance the `swift_release()` of the returned value. Fixes swiftlang#47846, swiftlang#45359. rdar://23335318
0f5358f
to
8d6783d
Compare
@swift-ci Please smoke test |
@swift-ci test WebAssembly |
I wonder if we can remove the workaround in libdispatch with this merged: https://github.com/apple/swift-corelibs-libdispatch/blob/main/src/swift/DispatchStubs.cc#L65-L95 |
Tweak the tests slightly for WASM, Windows and Darwin. rdar://23335318
8d6783d
to
0d7c575
Compare
That's the idea. And not add another one, which is what prompted me to try to fix this. |
@swift-ci Please smoke test |
@swift-ci test WebAssembly |
@swift-ci please smoke test macOS platform |
@swift-ci Please test Linux platform |
Linux + aarch64 CIs are failing
|
When ObjC interop is not enabled, we shouldn't be emitting calls to
objc_retainAutoreleasedReturnValue()
as that function might not exist.Call
swift_retain()
instead, to balance theswift_release()
of the returned value.Fixes #47846, fixes #45359.
rdar://23335318