Skip to content

Commit 212c9ba

Browse files
committed
IRGen: Tweak mapTypeOutOfContext() usage
1 parent 36b3f0e commit 212c9ba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/IRGen/GenReflection.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ IRGenModule::getLoweredTypeRef(SILType loweredType,
368368
auto substTy =
369369
substOpaqueTypesWithUnderlyingTypes(loweredType, genericSig);
370370
auto type = substTy.getASTType();
371-
if (substTy.hasArchetype())
372-
type = type->mapTypeOutOfContext()->getCanonicalType();
373-
374371
return getTypeRefImpl(*this, type, genericSig, role);
375372
}
376373

@@ -1324,7 +1321,7 @@ class CaptureDescriptorBuilder : public ReflectionMetadataBuilder {
13241321

13251322
// Now add typerefs of all of the captures.
13261323
for (auto CaptureType : CaptureTypes) {
1327-
addLoweredTypeRef(CaptureType, sig);
1324+
addLoweredTypeRef(CaptureType.mapTypeOutOfContext(), sig);
13281325
}
13291326

13301327
// Add the pairs that make up the generic param -> metadata source map

0 commit comments

Comments
 (0)