Skip to content

Commit 7147d35

Browse files
committed
IRGen: Remove apparently-dead workaround
1 parent 4017baa commit 7147d35

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/IRGen/GenArchetype.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,6 @@ llvm::Value *irgen::emitArchetypeWitnessTableRef(IRGenFunction &IGF,
173173
auto wtable = IGF.tryGetLocalTypeData(archetype, localDataKind);
174174
if (wtable) return wtable;
175175

176-
// It can happen with class constraints that Sema will consider a
177-
// constraint to be abstract, but the minimized signature will
178-
// eliminate it as concrete. Handle this by performing a concrete
179-
// lookup.
180-
// TODO: maybe Sema shouldn't ever do this?
181-
if (Type classBound = archetype->getSuperclass()) {
182-
auto conformance =
183-
IGF.IGM.getSwiftModule()->lookupConformance(classBound, protocol);
184-
if (conformance && conformance->isConcrete()) {
185-
return emitWitnessTableRef(IGF, archetype, *conformance);
186-
}
187-
}
188-
189176
// If we don't have an environment, this must be an implied witness table
190177
// reference.
191178
// FIXME: eliminate this path when opened types have generic environments.

0 commit comments

Comments
 (0)