Alex Lorenz
9d7460f130
[interop][SwiftToCxx] NFC, add missing include to swift-class-execution.cpp test
2023-05-08 06:54:57 -07:00
Alex Lorenz
f0967a4af1
Revert "Disable test/Interop/SwiftToCxx/class/swift-class-execution.cpp"
...
This reverts commit 5ce8b6cb06 .
2023-05-08 06:54:47 -07:00
Arnold Schwaighofer
5ce8b6cb06
Disable test/Interop/SwiftToCxx/class/swift-class-execution.cpp
...
It failed on a package bot.
https://ci.swift.org/job/oss-swift-package-ubi-9/506/consoleText
rdar://109037144
2023-05-08 06:38:31 -07:00
Alex Lorenz
16b1fe173f
[interop][SwiftToCxx] moving a Swift class in C++ performs a copy
...
C++ does not have a consuming move, so fallback to copy instead
Resolves https://github.com/apple/swift/issues/64702
2023-05-07 08:55:20 -07:00
Nate Chandler
90f7af22c9
[SILOpt] Run DestroyAddrHoisting in mandatory.
...
Run DestroyAddrHoisting in the pipeline where DestroyHoisting was
previously running. Avoid extra ARC traffic that having no form of
destroy hoisting in the mandatory pipeline results in.
rdar://90495704
2023-04-04 11:11:34 -07:00
Alex Lorenz
394c5bc7ce
[interop] fix tests after fixing private annotations on the 'swift' namespace
2023-03-18 19:30:06 -07:00
Alex Lorenz
3b7c92073b
Merge pull request #64265 from hyp/eng/swift-stdlib-is-swift-whoda-thunk-it
...
[interop][SwiftToCxx] emit Swift's stdlib inside of 'swift' namespace
2023-03-10 06:40:11 -08:00
Alex Lorenz
0dc90d38c1
[interop][SwiftToCxx] emit Swift's stdlib inside of 'swift' namespace
2023-03-09 17:32:43 -08:00
Alex Lorenz
617ead4a9d
[interop][SwiftToCxx] do not emit _Concurrency APIs in the C++ section of the generated header
...
Fixes an issue where actors exposed its unownedExecutor property with unsupported type.
2023-03-09 10:51:22 -08:00
Augusto Noronha
6f68fb0dde
Merge pull request #63950 from augusto2112/print-debug-name
...
Print debug name
2023-03-01 15:14:55 -08:00
Augusto Noronha
c3d3c37c15
Adapt tests to have the Swift mangled name as a field in interop types
2023-02-27 15:58:03 -08:00
Alex Lorenz
f8c3895f32
[interop][SwiftToCxx] print availability attributes for Swift decls in C++
2023-02-27 12:07:36 -08:00
Alex Lorenz
3948a2a5d3
[interop][SwiftToCxx] annotate inline thunks with SWIFT_INLINE_THUNK
...
This macro applies always_inline in addition to inline. It also applies artificial, which lets debugger know that this is an artificial function. The used attribute is added in debug builds to ensure that the symbol is emitted in the binary so that LLDB can invoke it.
2023-02-24 11:23:46 -08:00
Mike Ash
20ae0ad34e
[Test] Disable some failing tests on ARM64e.
...
Disabling these tests:
IRGen/ptrauth-foreign.sil
IRGen/ptrauth_field_fptr_import.swift
Interop/SwiftToCxx/class/swift-class-virtual-method-dispatch-arm64e.swift
Interop/SwiftToCxx/class/swift-class-virtual-method-dispatch.swift
Interop/SwiftToCxx/class/swift-subclass-of-resilient-class-virtual-method-dispatch.swift
2023-02-14 11:39:44 -05:00
Alex Lorenz
45eb84614f
test, add executable_test requirement
2023-02-13 10:35:01 -08:00
Alex Lorenz
a479641c84
[interop][SwiftToCxx] make type in test for resilient against arch changes
2023-02-13 10:32:49 -08:00
Alex Lorenz
c9f9d9025b
[interop][SwiftToCxx] fix offset computation for 32 bit platforms for vtable dispatch
2023-02-13 10:30:38 -08:00
Alex Lorenz
540202fed8
[interop][SwiftToCxx] dispatch virtual Swift methods using a relative offset into the vtable for classes deriving from resilient classes
2023-02-13 10:30:32 -08:00
Alex Lorenz
981e828b2a
[interop][SwiftToCxx] dispatch swift class methods using signed isa and signed method pointer on arm64e
2023-02-11 14:05:59 -08:00
Alex Lorenz
b63577d89e
[interop][SwiftToCxx] use vtable/thunk to dispatch class subscript getters
2023-02-11 05:55:54 -08:00
Alex Lorenz
71e4462508
[interop][SwiftToCxx] use vtable offset/thunk to dispatch class property accessors
2023-02-11 05:55:47 -08:00
Alex Lorenz
06bfef2978
Merge pull request #63572 from hyp/eng/vtable2
...
[interop][SwiftToCxx] dispatch virtual calls via thunks for resilient…
2023-02-11 05:54:29 -08:00
Alex Lorenz
9e32761578
[interop][SwiftToCxx] dispatch virtual calls via thunks for resilient classes
2023-02-10 16:32:54 -08:00
Mike Ash
58d64376df
[Test] Add REQUIRES: executable_test to swift-class-virtual-method-dispatch-execution.cpp.
2023-02-10 19:25:28 -05:00
Alex Lorenz
b7007cb748
[interop][SwiftToCxx] dispatch Swift class methods correctly using the vtable
2023-02-09 20:20:53 -08:00
Alex Lorenz
3b3d6c825a
[interop][SwiftToCxx] Annotate emitted declarations with Clang's external_source_symbol attribute
...
Each emitted declaration is annotated with the external_source_symbol with its own USR, to allow Clang's indexer to recognize this declaration as a Swift declaration with a specific USR
2023-01-12 12:15:01 -08:00
Alex Lorenz
0312e0613d
[interop][SwiftToCxxToSwift] hide reverse interop module namespaces from forward interop
2022-11-07 15:52:04 -08:00
Alex Lorenz
1a277f239e
[interop][SwiftToCxx] actor tests should disable availability checking on macos
2022-11-02 14:40:28 -07:00
Alex Lorenz
1c19c15c78
[interop][SwiftToCxx] actor tests require Concurrency
2022-11-02 12:28:10 -07:00
Alex Lorenz
0d754e1d3f
[interop][SwiftToCxx] add support for exposing non-isolated actor declarations
2022-11-02 12:17:55 -07:00
Alex Lorenz
3a9b6dce9d
[interop][SwiftToCxx] add support for emitting Swift stdlib dependency in one header file
...
This is the default behavior. You can disable this by specifying the -clang-header-expose-decls= flag explicitly when generating the header
2022-09-28 08:08:48 -07:00
Alex Lorenz
2a05109c58
[interop][SwiftToCxx] Declare the generic usability type trait before the C++ class that represents the Swift type
...
This allows you to import a method that returns the type of the context in which the method is declared when such
type is a generic parameter in another type. This means that it's now possible to bridge the initializer for
RawRepresentable enums.
2022-09-21 07:57:32 -07:00
Alex Lorenz
ef5d11aab8
[interop][SwiftToCxx] NFC, Make swift::getTypeMetadata accessor part of struct template
...
This allows partial template specializations for adding metadata accessor for generic types 🤩
2022-08-31 17:16:45 -07:00
Alex Lorenz
330fc0b07a
[interop][SwiftToCxx] generic functions should return value types correctly
2022-08-09 05:20:58 -07:00
Alex Lorenz
7ecf84a771
[interop][SwiftToCxx] ensure that resilient class values are supported
2022-08-08 13:08:54 -07:00
Alex Lorenz
a9f262e322
[interop][SwiftToCxx] add support for passing and returning class values to generic functions
2022-08-08 08:38:28 -07:00
Alex Lorenz
7c5b160bc6
[interop][SwiftToCxx] map class inheritance to C++ class hierarchy
2022-08-03 09:35:36 +01:00
Alex Lorenz
3e3e6eab33
[interop][SwiftToCxx] NFC, add missing checks for inout class passing C++ thunk
2022-08-03 07:17:44 +01:00
Alex Lorenz
478987b54e
[interop][SwiftToCxx] expose getOpaquePointer class pointer accessors via swift helper class in shims header
2022-08-02 20:15:10 +01:00
Alex Lorenz
e03903cb51
[interop][SwiftToCxx] add a test to verify class reference can't be directly constructed from a void *
2022-08-02 18:59:58 +01:00
Alex Lorenz
0ca61069ea
[interop][SwiftToCxx] Add a base ref counted Swift class type to _SwiftCxxInteroperability.h header
2022-08-02 18:54:14 +01:00
Alex Lorenz
c332a90a8a
[interop][SwiftToCxx] retain & release class values when a C++ class reference is copy assigned
2022-08-02 17:52:49 +01:00
Alex Lorenz
e289865861
[interop][SwiftToCxx] retain class values when a C++ class reference is copy constructed
2022-08-02 17:34:21 +01:00
Alex Lorenz
e1d812a848
[interop][SwiftToCxx] pass class parameter types by 'inout'
2022-08-02 16:48:12 +01:00
Alex Lorenz
51c0a3ff05
[interop][SwiftToCxx] add support for passing class types to Swift functions
2022-08-02 15:22:16 +01:00
Alex Lorenz
a8ed297e8b
[interop][SwiftToCxx] class bridging: use makeRetained to return a class value from Swift
2022-08-02 14:55:58 +01:00
Alex Lorenz
26d55a2b83
[interop][SwiftToCxx] start emitting bindings for Swift class types
...
This includes release on destruction, and correctly returning class values from Swift to C++.
2022-08-02 09:25:35 +01:00