mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Adds sections `__TEXT,__swift_as_entry`, and `__TEXT,__swift_as_ret` that contain relative pointers to async functlets modelling async function entries, and function returns, respectively. Emission of the sections can be trigger with the frontend option `-Xfrontend -enable-async-frame-push-pop-metadata`. This is done by: * IRGen adding a `async_entry` function attribute to async functions. * LLVM's coroutine splitting identifying continuation funclets that model the return from an async function call by adding the function attribute `async_ret`. (see #llvm-project/pull/9204) * An LLVM pass that keys off these two function attribute and emits the metadata into the above mention sections. rdar://134460666
19 lines
381 B
CMake
19 lines
381 B
CMake
|
|
add_swift_host_library(swiftLLVMPasses STATIC
|
|
LLVMSwiftAA.cpp
|
|
LLVMSwiftRCIdentity.cpp
|
|
LLVMARCOpts.cpp
|
|
LLVMARCContract.cpp
|
|
LLVMInlineTree.cpp
|
|
LLVMMergeFunctions.cpp
|
|
LLVMEmitAsyncEntryReturnMetadata.cpp
|
|
|
|
LLVM_LINK_COMPONENTS
|
|
analysis
|
|
targetparser
|
|
)
|
|
target_link_libraries(swiftLLVMPasses PRIVATE
|
|
swiftDemangling)
|
|
|
|
set_swift_llvm_is_available(swiftLLVMPasses)
|