Commit Graph

3 Commits

Author SHA1 Message Date
Doug Gregor 4f1a0b7016 [Embedded] Add _swift_exit() to the Platform Abstraction Layer
The Embedded Swift concurrency library needs a way to exit the program
at the end of async main. The existing implementation calls through a
_swift_exit() function to the POSIX/C exit(). Enshrine _swift_exit()
as part of the Platform Abstraction Layer, with the same signature
(albeit in C), and implement it in the PAL-on-POSIX library as a call
through to exit().
2026-05-05 21:30:59 -07:00
Dario Rexin 5b0da23150 [IRGen] Add typed allocations for embedded Swift
rdar://158239258

This change adds logic in the compiler to compute malloc type ids and emit them together with typed allocation calls. It also adds the new runtime function swift_allocObjectTyped, which calls typed malloc.
2026-03-05 12:41:16 -08:00
Doug Gregor ae1e3d0865 Build a static library that implements the Embedded Swift platform layer on POSIX
The new library, swiftEmbeddedPlatformPOSIX, implements all of the
_swift_XYZ functions needed to support Embedded Swift as shims on top
of a POSIX system that provides posix_memalign, free, putchar, and so
on. This offers an easier way to bridge between the prior ad hoc
requirements of Embedded Swift and the newer platform abstraction
layer.

Part of rdar://164057124
2026-03-03 09:05:30 -08:00