Commit Graph

7 Commits

Author SHA1 Message Date
Saleem Abdulrasool
1040116e32 IRGen: rework linking against CxxStdlib
Rewrite the handling for the `CxxStdlib` implicit linking to use a
slightly more functional style for filtering.  Additionally, add Windows
to the list providing the overlay.  The Windows linking scenario is a
slightly more complicated as the library names differ between static and
dynamic variants to disambiguate between import libraries and static
libraries.  Take this into account when embedding the library name so
that the linker can find the appropriate content.
2023-08-08 09:03:37 -07:00
zoecarver
13b0a5bc37 [nfc] Clang format changes. 2022-07-21 17:34:36 -04:00
zoecarver
74d76e2888 [cxx-interop] Add diagnostics and validation for retain/release function; require all foreign reference types to provide retain release functions or be immortal. 2022-07-21 12:25:21 -04:00
zoecarver
6acffbbee6 [cxx-interop] Flip the switch: only import safe APIs. 2022-07-18 17:15:15 -04:00
Egor Zhdan
5aea9195e3 [cxx-interop] Update tests for foreign reference types
This fixes errors in tests:
```
/home/build-user/swift/test/Interop/Cxx/foreign-reference/Inputs/singleton.h:8:14: error: 'operator new' is missing exception specification 'noexcept'
inline void *operator new(size_t, void *p) { return p; }
             ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new:173:33: note: previous declaration is here
_GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
```
2022-07-04 19:06:11 +01:00
zoecarver
f86f9b7035 [cxx-interop] Record extra layer of indirection when calulating clang type from SILType. 2022-06-24 16:05:41 -07:00
zoecarver
fc3b3a1d71 [cxx-interop] Implement foreign reference types.
This is an expiremental feature to allow an attribute, `import_as_ref`, to import a C++ record as a non-reference-counted reference type in Swift.
2021-12-08 15:35:18 +00:00