Skip to content
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

[6.1][cxx-interop] Remove escapability interop annotations #77828

Open
wants to merge 1 commit into
base: release/6.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions lib/ClangImporter/SwiftBridging/swift/bridging
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@

#define _CXX_INTEROP_STRINGIFY(_x) #_x

#define _CXX_INTEROP_CONCAT_(a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,...) \
#a "," #b "," #c "," #d "," #e "," #f "," #g "," #i "," #j "," #k "," \
#l "," #m "," #n "," #o "," #p
#define _CXX_INTEROP_CONCAT(...) \
_CXX_INTEROP_CONCAT_(__VA_ARGS__,,,,,,,,,,,,,,,,,)

/// Specifies that a C++ `class` or `struct` is reference-counted using
/// the given `retain` and `release` functions. This annotation lets Swift import
/// such a type as reference counted type in Swift, taking advantage of Swift's
Expand Down Expand Up @@ -165,24 +159,6 @@
#define SWIFT_NONCOPYABLE \
__attribute__((swift_attr("~Copyable")))

/// Specifies that a specific c++ type such class or struct should be imported
/// as a non-escapable Swift value type when the non-escapable language feature
/// is enabled.
#define SWIFT_NONESCAPABLE \
__attribute__((swift_attr("~Escapable")))

/// Specifies that a specific c++ type such class or struct should be imported
/// as a escapable Swift value. While this matches the default behavior,
/// in safe mode interop mode it ensures that the type is not marked as
/// unsafe.
#define SWIFT_ESCAPABLE \
__attribute__((swift_attr("Escapable")))

/// Specifies that a C++ `class` or `struct` should be imported as a escapable
/// Swift value if all of the specified template arguments are escapable.
#define SWIFT_ESCAPABLE_IF(...) \
__attribute__((swift_attr("escapable_if:" _CXX_INTEROP_CONCAT(__VA_ARGS__))))

/// Specifies that the return value is passed as owned for C++ functions and
/// methods returning types annotated as `SWIFT_SHARED_REFERENCE`
#define SWIFT_RETURNS_RETAINED __attribute__((swift_attr("returns_retained")))
Expand All @@ -205,9 +181,6 @@
#define SWIFT_MUTATING
#define SWIFT_UNCHECKED_SENDABLE
#define SWIFT_NONCOPYABLE
#define SWIFT_NONESCAPABLE
#define SWIFT_ESCAPABLE
#define SWIFT_ESCAPABLE_IF(...)
#define SWIFT_RETURNS_RETAINED
#define SWIFT_RETURNS_UNRETAINED

Expand Down
91 changes: 0 additions & 91 deletions test/Interop/Cxx/class/nonescapable-errors.swift

This file was deleted.

111 changes: 0 additions & 111 deletions test/Interop/Cxx/class/nonescapable-lifetimebound.swift

This file was deleted.

73 changes: 0 additions & 73 deletions test/Interop/Cxx/class/safe-interop-mode.swift

This file was deleted.