mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IRGen: Centralize logic that decides whether the platform suppports typed malloc
NFC intended
This commit is contained in:
@@ -3789,10 +3789,15 @@ 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);
|
||||
|
||||
bool platformSupportsTypedMalloc = !llvm::Triple(Triple).isOSLinux() &&
|
||||
!llvm::Triple(Triple).isOSWindows();
|
||||
|
||||
Opts.EmitTypeMallocForCoroFrame =
|
||||
Args.hasFlag(OPT_enable_emit_type_malloc_for_coro_frame,
|
||||
OPT_disable_emit_type_malloc_for_coro_frame,
|
||||
Opts.EmitTypeMallocForCoroFrame);
|
||||
(Opts.EmitTypeMallocForCoroFrame && platformSupportsTypedMalloc));
|
||||
|
||||
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