Skip to content

Commit 855c575

Browse files
committed
[NFC] AST: Clean up unused field and parameter in LocalArchetypeType subclasses
1 parent 7793f63 commit 855c575

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

include/swift/AST/Types.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6976,8 +6976,6 @@ class OpenedArchetypeType final : public LocalArchetypeType,
69766976
friend ArchetypeType;
69776977
friend GenericEnvironment;
69786978

6979-
UUID ID;
6980-
69816979
/// Create a new opened archetype in the given environment representing
69826980
/// the interface type.
69836981
///
@@ -6993,10 +6991,7 @@ class OpenedArchetypeType final : public LocalArchetypeType,
69936991
/// of an existential value.
69946992
///
69956993
/// \param existential The existential type to open.
6996-
/// \param knownID When non-empty, the known ID of the archetype. When empty,
6997-
/// a fresh archetype with a unique ID will be opened.
6998-
static CanTypeWrapper<OpenedArchetypeType>
6999-
get(CanType existential, std::optional<UUID> knownID = std::nullopt);
6994+
static CanTypeWrapper<OpenedArchetypeType> get(CanType existential);
70006995

70016996
/// Create a new archetype that represents the opened type
70026997
/// of an existential value.
@@ -7071,8 +7066,6 @@ class ElementArchetypeType final : public LocalArchetypeType,
70717066
friend ArchetypeType;
70727067
friend GenericEnvironment;
70737068

7074-
UUID ID;
7075-
70767069
/// Create a new element archetype in the given environment representing
70777070
/// the interface type.
70787071
///

lib/AST/ASTContext.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5561,19 +5561,13 @@ CanTypeWrapper<OpenedArchetypeType> OpenedArchetypeType::getNew(
55615561
properties));
55625562
}
55635563

5564-
CanOpenedArchetypeType OpenedArchetypeType::get(CanType existential,
5565-
std::optional<UUID> knownID) {
5564+
CanOpenedArchetypeType OpenedArchetypeType::get(CanType existential) {
55665565
auto &ctx = existential->getASTContext();
55675566
auto existentialSig = ctx.getOpenedExistentialSignature(existential);
55685567

5569-
if (!knownID)
5570-
knownID = UUID::fromTime();
5571-
55725568
auto *genericEnv = GenericEnvironment::forOpenedExistential(
5573-
existentialSig.OpenedSig,
5574-
existentialSig.Shape,
5575-
existentialSig.Generalization,
5576-
*knownID);
5569+
existentialSig.OpenedSig, existentialSig.Shape,
5570+
existentialSig.Generalization, UUID::fromTime());
55775571

55785572
return cast<OpenedArchetypeType>(
55795573
genericEnv->mapTypeIntoContext(existentialSig.SelfType)

0 commit comments

Comments
 (0)