Skip to content

Commit 267ff07

Browse files
authored
Merge pull request swiftlang#77828 from swiftlang/gaborh/nonesc-remove
[6.1][cxx-interop] Remove escapability interop annotations
2 parents 7db95fb + b583656 commit 267ff07

File tree

4 files changed

+0
-325
lines changed

4 files changed

+0
-325
lines changed

lib/ClangImporter/SwiftBridging/swift/bridging

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@
3939

4040
#define _CXX_INTEROP_STRINGIFY(_x) #_x
4141

42-
#define _CXX_INTEROP_CONCAT_(a,b,c,d,e,f,g,i,j,k,l,m,n,o,p,...) \
43-
#a "," #b "," #c "," #d "," #e "," #f "," #g "," #i "," #j "," #k "," \
44-
#l "," #m "," #n "," #o "," #p
45-
#define _CXX_INTEROP_CONCAT(...) \
46-
_CXX_INTEROP_CONCAT_(__VA_ARGS__,,,,,,,,,,,,,,,,,)
47-
4842
/// Specifies that a C++ `class` or `struct` is reference-counted using
4943
/// the given `retain` and `release` functions. This annotation lets Swift import
5044
/// such a type as reference counted type in Swift, taking advantage of Swift's
@@ -165,24 +159,6 @@
165159
#define SWIFT_NONCOPYABLE \
166160
__attribute__((swift_attr("~Copyable")))
167161

168-
/// Specifies that a specific c++ type such class or struct should be imported
169-
/// as a non-escapable Swift value type when the non-escapable language feature
170-
/// is enabled.
171-
#define SWIFT_NONESCAPABLE \
172-
__attribute__((swift_attr("~Escapable")))
173-
174-
/// Specifies that a specific c++ type such class or struct should be imported
175-
/// as a escapable Swift value. While this matches the default behavior,
176-
/// in safe mode interop mode it ensures that the type is not marked as
177-
/// unsafe.
178-
#define SWIFT_ESCAPABLE \
179-
__attribute__((swift_attr("Escapable")))
180-
181-
/// Specifies that a C++ `class` or `struct` should be imported as a escapable
182-
/// Swift value if all of the specified template arguments are escapable.
183-
#define SWIFT_ESCAPABLE_IF(...) \
184-
__attribute__((swift_attr("escapable_if:" _CXX_INTEROP_CONCAT(__VA_ARGS__))))
185-
186162
/// Specifies that the return value is passed as owned for C++ functions and
187163
/// methods returning types annotated as `SWIFT_SHARED_REFERENCE`
188164
#define SWIFT_RETURNS_RETAINED __attribute__((swift_attr("returns_retained")))
@@ -205,9 +181,6 @@
205181
#define SWIFT_MUTATING
206182
#define SWIFT_UNCHECKED_SENDABLE
207183
#define SWIFT_NONCOPYABLE
208-
#define SWIFT_NONESCAPABLE
209-
#define SWIFT_ESCAPABLE
210-
#define SWIFT_ESCAPABLE_IF(...)
211184
#define SWIFT_RETURNS_RETAINED
212185
#define SWIFT_RETURNS_UNRETAINED
213186

test/Interop/Cxx/class/nonescapable-errors.swift

Lines changed: 0 additions & 100 deletions
This file was deleted.

test/Interop/Cxx/class/nonescapable-lifetimebound.swift

Lines changed: 0 additions & 125 deletions
This file was deleted.

test/Interop/Cxx/class/safe-interop-mode.swift

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)