Commit Graph

454 Commits

Author SHA1 Message Date
Arnold Schwaighofer
1dfc30eb1f Merge remote-tracking branch 'origin/main' into rebranch 2023-02-27 09:18:56 -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
swift-ci
e0a60b8dd3 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-14 13:15:39 -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
swift-ci
555d1d1edc Merge remote-tracking branch 'origin/main' into rebranch 2023-02-13 16:13:41 -08: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
swift-ci
d5bbc72d6d Merge remote-tracking branch 'origin/main' into rebranch 2023-02-12 05:53:09 -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
swift-ci
2044f9d1da Merge remote-tracking branch 'origin/main' into rebranch 2023-02-11 11:53:46 -08:00
swift-ci
84ce331135 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-11 06:12:52 -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
swift-ci
6030dee446 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-10 22:13: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
swift-ci
631323173c Merge remote-tracking branch 'origin/main' into rebranch 2023-02-10 08:16:39 -08:00
Alex Lorenz
b7007cb748 [interop][SwiftToCxx] dispatch Swift class methods correctly using the vtable 2023-02-09 20:20:53 -08:00
swift-ci
2c2900a229 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-09 06:33:03 -08:00
swift-ci
8408fe62ac Merge remote-tracking branch 'origin/main' into rebranch 2023-02-08 16:13:13 -08:00
Alex Lorenz
b70ba0963d [interop][SwiftToCxx] remove extraneous ';' from generated header 2023-02-08 12:43:30 -08:00
Alex Lorenz
0b0cc99c98 [interop][SwiftToCxx] avoid -Wshadow warning for C++ representation of enum member parameters 2023-02-08 12:33:18 -08:00
Alex Lorenz
8305c7d5de [interop][SwiftToCxx] add C++ bindings for static methods 2023-02-08 10:25:17 -08:00
swift-ci
cdaa821569 Merge remote-tracking branch 'origin/main' into rebranch 2023-01-19 12:54:01 -08:00
Alex Lorenz
13ff3fe0b6 Merge pull request #62952 from WANGJIEKE/cxx-interop-enum-associated-value-class-type
[Interop][SwiftToCxx] Add class type support for enum with associated value
2023-01-19 12:47:37 -08:00
Saleem Abdulrasool
7eb4a9254d Merge pull request #63026 from compnerd/untyped
test: adjust for untyped pointers in LLVM
2023-01-18 10:45:41 -08:00
swift-ci
7fc8b1111d Merge remote-tracking branch 'origin/main' into rebranch 2023-01-17 17:15:15 -08:00
Saleem Abdulrasool
e7a3c4dbd9 test: adjust for untyped pointers in LLVM
The LLVM IR has begun migration towards untyped pointers.  Adjust the
test to follow suit.  This was identified when working towards Windows
support for the rebranch.
2023-01-13 12:37:33 -08:00
Alex Lorenz
cc5b557cee [interop][SwiftToCxx] Attach SWIFT_SYMBOL to C++ enum case declarations 2023-01-12 14:01:30 -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
Tongjie Wang
b27f35b1a0 improve test case: add retainCount check 2023-01-10 15:08:51 -08:00
Tongjie Wang
3aea6a8977 [Interop][SwiftToCxx] Add class type support for enum with associated value 2023-01-10 13:40:34 -08:00
swift-ci
d9abbfe069 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-20 07:35:02 -08:00
Alex Lorenz
a6e056ba7e Merge pull request #62701 from Robertorosmaninho/cxx-interop/RefactorSwiftReturnThank
Refactor C++ to return Swift::Expected instead of SWIFT_RETURN_THUNK
2022-12-20 07:31:55 -08:00
swift-ci
157d48dd90 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-19 14:54:06 -08:00
Roberto Rosmaninho
fc68fb304e Refactoring the C++ thunk to directly return the Swift::Expected intead od the SWIFT_RETURN_THUNK macro 2022-12-19 19:48:35 -03:00
Alex Lorenz
8cd18670bf [interop][SwiftToCxx] disable the arm64e testing for swift-expected-execution.cpp 2022-12-19 10:13:54 -08:00
swift-ci
c4510b8bd0 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-16 17:53:38 -08:00
Alex Lorenz
2c83ff7643 Merge pull request #61823 from Robertorosmaninho/interop/ExpectedClassForErrorHandling
[Interop][SwiftToCxx] Introduces swift::Expected
2022-12-16 17:47:28 -08:00
swift-ci
efb80004f1 Merge remote-tracking branch 'origin/main' into rebranch 2022-12-15 14:33:36 -08:00
Alex Lorenz
244ca4e242 Merge pull request #62597 from hyp/eng/string-to-std-string
[interop][SwiftToCxx] make it possible to convert Swift String to a std::string in C++
2022-12-15 14:14:16 -08:00
Alex Lorenz
15b100784b [interop][SwiftToCxx] relax the swift-stdlib-in-cxx.swift testcase 2022-12-15 07:15:52 -08:00
Alex Lorenz
a7ec9f1fcb [interop][SwiftToCxx] also test for UTF8View API in the test 2022-12-14 16:30:59 -08:00
Alex Lorenz
5e09a5c30b [interop][SwiftToCxx] move std::string -> Swift String constructor to the overlay header 2022-12-14 16:27:29 -08:00
Alex Lorenz
28af8bef55 [interop][SwiftToCxx] make it possible to convert Swift String to a std::string in C++
This is done by exposing nested Index and UTF8View type in String. Nested types aren't
supported yet, so we need to employ a number of hacks to emit them.
2022-12-14 16:22:41 -08:00
Roberto Rosmaninho
ce666ac592 [Interop][SwiftToCxx] Adding support to return Swift::Expected when exceptions are not available. 2022-12-14 12:07:43 -03:00
Roberto Rosmaninho
a2633d942b [Interop][SwiftToCxx] Fixing swift-expected-execution.cpp test 2022-12-14 12:07:43 -03:00