mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SUA][IRGen] Change IRGen to emit calls to swift_coroFrameAlloc (#79384)
When TMO is enabled, change IRGen to pass the newly introduced runtime function `swift_coroFrameAlloc` (and pass an additional argument — the hash value) instead of `malloc` when it inserts calls to `coro_id_retcon_once`. The hashValue is computed based on the current function name (computed in `getDiscriminatorForString`) rdar://141235957
This commit is contained in:
@@ -3630,6 +3630,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
Args.hasFlag(OPT_enable_async_frame_push_pop_metadata,
|
||||
OPT_disable_async_frame_push_pop_metadata,
|
||||
Opts.EmitAsyncFramePushPopMetadata);
|
||||
Opts.EmitTypeMallocForCoroFrame =
|
||||
Args.hasFlag(OPT_enable_emit_type_malloc_for_coro_frame,
|
||||
OPT_disable_emit_type_malloc_for_coro_frame,
|
||||
Opts.EmitTypeMallocForCoroFrame);
|
||||
Opts.AsyncFramePointerAll = Args.hasFlag(OPT_enable_async_frame_pointer_all,
|
||||
OPT_disable_async_frame_pointer_all,
|
||||
Opts.AsyncFramePointerAll);
|
||||
|
||||
Reference in New Issue
Block a user