Add a function for querying the isolation of an Initializer.

This commit is contained in:
John McCall
2025-09-09 14:15:05 -04:00
parent a6c40c75c8
commit df7cfbfbc1
2 changed files with 65 additions and 26 deletions

View File

@@ -28,6 +28,7 @@ class raw_ostream;
namespace swift {
class DeclContext;
class Initializer;
class ModuleDecl;
class VarDecl;
class NominalTypeDecl;
@@ -434,6 +435,10 @@ InferredActorIsolation getInferredActorIsolation(ValueDecl *value);
ActorIsolation
__AbstractClosureExpr_getActorIsolation(AbstractClosureExpr *CE);
/// Determine how the given initialization context is isolated.
ActorIsolation getActorIsolation(Initializer *init,
bool ignoreDefaultArguments = false);
/// Determine how the given declaration context is isolated.
/// \p getClosureActorIsolation allows the specification of actor isolation for
/// closures that haven't been saved been saved to the AST yet. This is useful