You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[+0-args][runtime] Add temporary runtime swift convention macros.
These are temporary staging macros to ease having a runtime that supports both
+0 and +1 conventions for functions exposed as Swift level functions in the
stdlib (and thus needing to follow the swift convention). The macros values are
toggled by the argument SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS and thus have
values described via the following table:
| SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENT | FALSE | TRUE |
|-----------------------------------------+-------------------------------+-------------------------------|
| SWIFT_NS_RELEASES_ARGUMENT | NS_RELEASES_ARGUMENT | "" |
| SWIFT_CC_PLUSONE_GUARD(...) | do { __VA_ARGS__ ; } while(0) | "" |
| SWIFT_CC_PLUSZERO_GUARD(...) | "" | do { __VA_ARGS__ ; } while(0) |
Thus instead of having to write an ugly #ifdef multiple times in each function
(for the arguments, destroys, and retains), we can just use these macros
instead.
In a subsequent commit I am going to cleanup the changes I made in the runtime
already to use these macros. So this is a NFC change.
rdar://34222540
0 commit comments