Alex Lorenz
7bf7642d51
[interop][SwiftToCxx] support @_expose attribute on initializers
2022-08-29 07:41:49 -07:00
Alex Lorenz
288e4cb566
[interop][SwiftToCxx] do not emit functions/methods that use unexposed types
2022-08-25 15:09:26 -07:00
Alex Lorenz
8de79390be
[interop][SwiftToCxx] add @_expose(Cxx) attribute support
...
This attribute instructs the compiler that this declaration should be included in the generated C++ bindings
2022-08-24 10:14:07 -07:00
Alex Lorenz
d4a7f86e3d
[interop][SwiftToCxx] do not emit unsupported function signatures yet
2022-08-16 14:39:22 -07:00
Alex Lorenz
f371c4307b
[interop][SwiftToCxx] pass boxed resilient value types to generic functions correctly
2022-08-09 14:16:58 -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
bb7ba7c7ce
Merge pull request #60442 from hyp/eng/generic-class
...
[interop][SwiftToCxx] add support for passing and returning class val…
2022-08-08 13:06:46 -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
7eefb30cb1
[interop][SwiftToCxx] emit property accessors in class types correctly
...
property accessors could potentially mutate the class instance, so don't make them const
2022-08-03 13:12:51 +01:00
Alex Lorenz
c0bda0617a
[interop][SwiftToCxx] emit class method bindings
2022-08-03 13:03:45 +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
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
Alex Lorenz
af32bbf8f3
[interop][SwiftToCxx] generics: add support for returning primitive generic types
2022-08-01 10:28:03 +01:00
Alex Lorenz
ea9276fb60
Merge pull request #60298 from hyp/i/gen/inout
...
[interop][SwiftToCxx] generics: support inOut generic param
2022-08-01 08:31:20 +01:00
Tongjie Wang
19c7d79540
Add missing pointer nullability annotation for inout function
2022-07-29 02:29:15 -07:00
Alex Lorenz
c31b6cfb0c
[interop][SwiftToCxx] generics: support inOut generic param
2022-07-29 09:15:40 +01:00
Alex Lorenz
32723f7e67
[interop][SwiftToCxx] initial generic function support: pass generic parameters
...
Only primitive types are supported at the moment from C++ as the type traits aren't emitted for all types yet
2022-07-28 22:52:21 +01:00
Alex Lorenz
8da01aa0f1
Merge pull request #60087 from WANGJIEKE/cxx-interop-extract-enum-payload
...
[Interop][SwiftToCxx] Initial support for getting associated values from enum
2022-07-28 12:06:44 +01:00
Alex Lorenz
0edddde7ae
[interop][SwiftToCxx] Add inout support for UnsafePointer/UnsafeMutablePointer param types
2022-07-26 15:39:29 +01:00
Alex Lorenz
9a80d78263
[interop][SwiftToCxx] pass and return UnsafePointer/UnsafeMutablePointer types
2022-07-26 15:30:14 +01:00
Alex Lorenz
3b4c6bffd8
[interop][SwiftToCxx] remap bool is/has property getters directly as is/has methods in C++
2022-07-26 14:34:40 +01:00
Alex Lorenz
c9bd89b115
[interop][SwiftToCxx] NFC, extract code to remap a property name to its own function
2022-07-26 14:21:30 +01:00
Alex Lorenz
760d59e8e1
[interop][SwiftToCxx] NFC, use FunctionSignatureModifiers to print 'static'
2022-07-26 14:20:30 +01:00
Alex Lorenz
5aafe4599c
[interop][SwiftToCxx] NFC, use FunctionSignatureModifiers to print 'inline'
2022-07-26 14:08:09 +01:00
Alex Lorenz
6f86d60e54
[interop][SwiftToCxx] NFC, use FunctionSignatureModifiers to print 'const'
2022-07-26 14:04:23 +01:00
Alex Lorenz
7e0c2a987d
Merge pull request #60079 from Robertorosmaninho/cxx-interop/SwiftToCxxErrorHandling
...
[Interop] [SwiftToCxx] Implementing a naive exception to be thrown in C++ if an Error is thrown in Swift
2022-07-20 15:54:48 +01:00
Tongjie Wang
290e527b0b
[Interop][SwiftToCxx] Initial support for getting associated values from enum
...
improve test cases
add support for primitive types
2022-07-18 18:19:00 -07:00
Alex Lorenz
23ed6e8c9f
[interop][SwiftToCxx] support instance property setters in C++
2022-07-18 17:49:51 +01:00
Roberto Rosmaninho
b15c6a5537
Implementing a naive exception to be thrown in C++ if an Error is thrown in Swift
...
Creating new Interop - SwiftToCxx test
2022-07-15 20:14:13 -03:00
Alex Lorenz
88c55c1778
[interop][SwiftToCxx] add support for passing/returning value types from other modules
2022-07-15 17:14:35 +01:00
Roberto Rosmaninho
ff222acebc
Setting hardcode SWIFT_NOEXCEPT and noexcept flags only to
...
non-throwing functions.
Activating swift-functions-errors tests
Inserting macros and additional parameters in C and C++ functions following the pattern to lowering to LLVM IR.
2022-07-14 12:34:53 -03:00
Tongjie Wang
00598e8019
[interop][SwiftToCxx] add initial support for passing/returning enums
2022-06-20 00:45:07 -07:00
Alex Lorenz
71065e94d3
[interop][SwiftToCxx] emit struct initializers
...
They're emtited as static init methods in the C++ class
2022-06-17 16:00:23 -07:00
Alex Lorenz
b47bb5b66e
[interop][SwiftToCxx] support mutating struct methods in C++
2022-06-17 07:58:19 -07:00
Alex Lorenz
5474d7e54d
[interop][SwiftToCxx] Add support for emitting resilient struct bindings
2022-06-15 20:33:23 -07:00
Alex Lorenz
f2b4a43c06
[interop][SwiftToCxx] emit non-mutating instance methods for structs
2022-06-15 07:35:13 -07:00
Alex Lorenz
d7fd1233a9
[interop][SwiftToCxx] emit instance property getters for structs
2022-06-14 17:20:37 -07:00
Tongjie Wang
0505266ef7
fix printing for inout type with nullability
2022-06-14 11:20:19 -07:00
Tongjie Wang
705e562aa1
improve based on code review feedback
2022-06-14 01:35:48 -07:00
Tongjie Wang
f033aad3c1
[interop][SwiftToCxx] pass struct to function as inout
2022-06-13 14:40:55 -07:00
Alex Lorenz
c7265f3b40
fix the macos tests
2022-06-09 08:52:22 -07:00
Alex Lorenz
132729906c
[interop][SwiftToCxx] pass / return Swift struct values between C/C++ and Swift
2022-06-08 07:03:24 -07:00
Tongjie Wang
b9c492aed4
print as pointer type in C layer
2022-05-31 20:23:04 -07:00
Tongjie Wang
ba2dcfb389
[cxx-interop] support inout params as cxx references
2022-05-29 20:55:13 -07:00
Alex Lorenz
d76c45d104
[interop] NFC, refactor clang function printer to share code between C and C++ signature printer
2022-03-29 15:09:12 -07:00
Alex Lorenz
f7902a6095
[cxx-interop] Emit C++ inline function thunks that with correct primitive types
2022-03-29 13:37:01 -07:00
Alex Lorenz
68fc606510
[interop] NFC, add a method to print out identifier to clang syntax printer
2022-03-24 21:54:44 -07:00
Alex Lorenz
e21abc140b
[interop] NFC, extract out isClangKeyword into ClangSyntaxPrinter
2022-03-24 19:20:42 -07:00