[CoroutineAccessors] Add flag to observe errors.

Temporarily allow the legacy behavior of allowing caller coroutine
accessors to observe errors (i.e. by executing no code after the yield
if the caller threw an error) behind the
CoroutineAccessorsUnwindOnCallerError flag.
This commit is contained in:
Nate Chandler
2024-10-08 15:40:29 -07:00
parent 8972d6214c
commit 11b5d27594
5 changed files with 19 additions and 4 deletions

View File

@@ -296,6 +296,7 @@ static bool usesFeatureAllowUnsafeAttribute(Decl *decl) {
UNINTERESTING_FEATURE(WarnUnsafe)
UNINTERESTING_FEATURE(SafeInterop)
UNINTERESTING_FEATURE(AssumeResilientCxxTypes)
UNINTERESTING_FEATURE(CoroutineAccessorsUnwindOnCallerError)
bool swift::usesFeatureIsolatedDeinit(const Decl *decl) {
if (auto cd = dyn_cast<ClassDecl>(decl)) {