Add a new frontend flag `-fswift-async-fp={auto|always|never}`
authorArnold Schwaighofer <aschwaighofer@apple.com>
Wed, 8 Sep 2021 14:26:08 +0000 (07:26 -0700)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 16 Sep 2021 15:48:51 +0000 (08:48 -0700)
commitf670c5aeeef09cd7b88e72cf8c1f2505d044a8ea
treed74f47069990ce6324c1ff029c6b9621a992c621
parentcfc74024195e3be44d023a505d80b7e19f4041fc
Add a new frontend flag `-fswift-async-fp={auto|always|never}`

Summary:
Introduce a new frontend flag `-fswift-async-fp={auto|always|never}`
that controls how code generation sets the Swift extended async frame
info bit. There are three possibilities:

* `auto`: which determines how to set the bit based on deployment target, either
statically or dynamically via `swift_async_extendedFramePointerFlags`.
* `always`: default, always set the bit statically, regardless of deployment
target.
* `never`: never set the bit, regardless of deployment target.

Differential Revision: https://reviews.llvm.org/D109451
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGen/swift-async-extended-fp.c [new file with mode: 0644]