Skip to content

Use new-style _Nullable keywords in obj-c header #260

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 1 commit into from
Dec 7, 2015

Conversation

lilyball
Copy link
Contributor

@lilyball lilyball commented Dec 6, 2015

Use the keywords _Nullable, _Nonnull, and _Null_unspecified
instead of the older compatibility forms __nullable, __nonnull, and
__null_unspecified.

Part of rdar://problem/23614638

Use the keywords `_Nullable`, `_Nonnull`, and `_Null_unspecified`
instead of the older compatibility forms `__nullable`, `__nonnull`, and
`__null_unspecified`.

Part of rdar://problem/23614638
@jeremyhu
Copy link

jeremyhu commented Dec 6, 2015

This would reduce compatibility with older toolchains.

@lattner
Copy link
Contributor

lattner commented Dec 6, 2015

Which ones are relevant to working with swift 2.2?

-Chris

On Dec 6, 2015, at 8:27 AM, Jeremy Huddleston Sequoia [email protected] wrote:

This would reduce compatibility with older toolchains.


Reply to this email directly or view it on GitHub.

@jeremyhu
Copy link

jeremyhu commented Dec 6, 2015

I'm just wondering if we'd have bootstrapping problems by doing that.

@lattner
Copy link
Contributor

lattner commented Dec 6, 2015

I don't think that is a concern. No released public clang supported the __nullable forms, and Swift includes its own drop of clang with it, that does support the new forms. If there was a compatibility issue, a few -D_Nullable=__nullable flags seem like they could be used to work around it.

That said, I'd like @jrose-apple to review this when it isn't the weekend :-)

@jeremyhu
Copy link

jeremyhu commented Dec 7, 2015

Ok, then that sounds good to me. I haven't looked at the build system yet, but as long as it uses the built clang instead of the bootstrap compiler, that should be fine. (see https://llvm.org/bugs/show_bug.cgi?id=25753 for why I bring this up).

@DougGregor
Copy link
Member

Xcode 6.3 used the double-underscored forms, and we changed the syntax in Xcode 7. That's why I'd been holding off on making this change.

@DougGregor
Copy link
Member

That said, this only affects code using the generated (Objective-)C headers, and the double-underscored keywords will cause problems on Linux. Merging.

DougGregor added a commit that referenced this pull request Dec 7, 2015
Use new-style _Nullable keywords in obj-c header
@DougGregor DougGregor merged commit c27b506 into swiftlang:master Dec 7, 2015
@lilyball lilyball deleted the objc-new-style-nullable branch December 7, 2015 08:01
slavapestov pushed a commit to slavapestov/swift that referenced this pull request Nov 27, 2018
slavapestov pushed a commit to slavapestov/swift that referenced this pull request Nov 27, 2018
cmake parity updates

Signed-off-by: Daniel A. Steffen <[email protected]>
freak4pc pushed a commit to freak4pc/swift that referenced this pull request Sep 28, 2022
Update BlueSocket commit and config to build against Swift 4.2
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.

5 participants