diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h --- a/clang/include/clang/Basic/CodeGenOptions.h +++ b/clang/include/clang/Basic/CodeGenOptions.h @@ -125,6 +125,13 @@ All, // Keep all frame pointers. }; + enum class SwiftAsyncFramePointerKind { + Auto, // Choose Swift async extended frame info based on deployment target. + Always, // Unconditionally emit Swift async extended frame info. + Never, // Don't emit Swift async extended frame info. + Default = Auto, + }; + enum FiniteLoopsKind { Language, // Not specified, use language standard. Always, // All loops are assumed to be finite. diff --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def --- a/clang/include/clang/Basic/CodeGenOptions.def +++ b/clang/include/clang/Basic/CodeGenOptions.def @@ -439,6 +439,11 @@ /// propagate signaling NaN inputs per IEEE 754-2008 (AMDGPU Only) CODEGENOPT(EmitIEEENaNCompliantInsts, 1, 1) +// Whether to emit Swift Async function extended frame information: auto, +// never, always. +ENUM_CODEGENOPT(SwiftAsyncFramePointer, SwiftAsyncFramePointerKind, 2, + SwiftAsyncFramePointerKind::Auto) + #undef CODEGENOPT #undef ENUM_CODEGENOPT #undef VALUE_CODEGENOPT diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1276,6 +1276,13 @@ Group, Flags<[CC1Option, CoreOption]>, HelpText<"Filename defining the list of functions/files to instrument">, MarshallingInfoStringVector>; +def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">, + Group, Flags<[CC1Option, CC1AsOption, CoreOption]>, MetaVarName<"