Skip to content

Commit b051c5a

Browse files
committed
Eliminate the unused ConformanceKind::UncheckedConforms. NFC
1 parent 5e24af7 commit b051c5a

File tree

7 files changed

+0
-19
lines changed

7 files changed

+0
-19
lines changed

include/swift/AST/Module.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ enum class ConformanceKind {
154154
DoesNotConform,
155155
/// The type conforms to the protocol, with the given conformance.
156156
Conforms,
157-
/// The type is specified to conform to the protocol, but that conformance
158-
/// has not yet been checked.
159-
UncheckedConforms
160157
};
161158

162159
/// The result of looking for a specific conformance.

lib/AST/ASTContext.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,10 +3611,6 @@ ASTContext::getBridgedToObjC(const DeclContext *dc, Type type,
36113611
// The type conforms, and we know the conformance, so we can look up the
36123612
// bridged type below.
36133613
break;
3614-
case ConformanceKind::UncheckedConforms:
3615-
// The type conforms, but we don't have a conformance yet. Return
3616-
// Optional(nullptr) to signal this.
3617-
return Type();
36183614
case ConformanceKind::DoesNotConform:
36193615
// If we haven't imported Foundation but this is a whitelisted type,
36203616
// behave as above.

lib/AST/ArchetypeBuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ static ProtocolConformance *getSuperConformance(
292292
}
293293

294294
case ConformanceKind::DoesNotConform:
295-
case ConformanceKind::UncheckedConforms:
296295
return nullptr;
297296
}
298297
}

lib/AST/Module.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,6 @@ ArrayRef<Substitution> BoundGenericType::getSubstitutions(
752752
conformances.push_back(
753753
ProtocolConformanceRef(proto, conforms.getPointer()));
754754
break;
755-
case ConformanceKind::UncheckedConforms:
756755
case ConformanceKind::DoesNotConform:
757756
conformances.push_back(ProtocolConformanceRef(proto));
758757
break;
@@ -851,8 +850,6 @@ LookupConformanceResult Module::lookupConformance(Type type,
851850
switch (inheritedConformance.getInt()) {
852851
case ConformanceKind::DoesNotConform:
853852
return { nullptr, ConformanceKind::DoesNotConform };
854-
case ConformanceKind::UncheckedConforms:
855-
return inheritedConformance;
856853
case ConformanceKind::Conforms:
857854
auto result =
858855
ctx.getInheritedConformance(type, inheritedConformance.getPointer());
@@ -912,9 +909,6 @@ LookupConformanceResult Module::lookupConformance(Type type,
912909
case ConformanceKind::DoesNotConform:
913910
llvm_unreachable("We already found the inherited conformance");
914911

915-
case ConformanceKind::UncheckedConforms:
916-
return inheritedConformance;
917-
918912
case ConformanceKind::Conforms:
919913
// Create inherited conformance below.
920914
break;

lib/AST/Type.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,6 @@ static Type getMemberForBaseType(Module *module,
24092409
auto conformance = module->lookupConformance(substBase, proto, resolver);
24102410
switch (conformance.getInt()) {
24112411
case ConformanceKind::DoesNotConform:
2412-
case ConformanceKind::UncheckedConforms:
24132412
return Type();
24142413

24152414
case ConformanceKind::Conforms:

lib/SILGen/SILGen.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ SILGenModule::getConformanceToObjectiveCBridgeable(SILLocation loc, Type type) {
276276
return result.getPointer();
277277

278278
case ConformanceKind::DoesNotConform:
279-
case ConformanceKind::UncheckedConforms:
280279
return nullptr;
281280
}
282281
}

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4063,9 +4063,6 @@ bool TypeChecker::conformsToProtocol(Type T, ProtocolDecl *Proto,
40634063
else
40644064
recordDependency();
40654065
return false;
4066-
4067-
case ConformanceKind::UncheckedConforms:
4068-
llvm_unreachable("Can't get here!");
40694066
}
40704067
}
40714068

0 commit comments

Comments
 (0)