AST: Remove ArchetypeType::getRoot()

This commit is contained in:
Slava Pestov
2024-08-30 13:42:02 -04:00
parent 21905afd85
commit 52ce02eb96
5 changed files with 40 additions and 56 deletions

View File

@@ -460,6 +460,18 @@ public:
SILValue getLocalGenericEnvironmentDef(GenericEnvironment *genericEnv,
SILFunction *inFunction);
/// Returns the instruction which defines the given local generic environment,
/// e.g. an open_existential_addr.
///
/// In contrast to getLocalGenericEnvironmentDef, it is required that all local
/// generic environments are resolved.
SingleValueInstruction *
getLocalGenericEnvironmentDefInst(GenericEnvironment *genericEnv,
SILFunction *inFunction) {
return dyn_cast<SingleValueInstruction>(
getLocalGenericEnvironmentDef(genericEnv, inFunction));
}
/// Returns the instruction which defines the given root local archetype,
/// e.g. an open_existential_addr.
///