Skip to content

Commit 389716a

Browse files
committed
Only collect count information if it's a value parameter
1 parent 7219daf commit 389716a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/IRGen/GenRecord.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,11 @@ class RecordTypeInfoImpl : public Base,
564564
.collectMetadataForOutlining(collector, loweredLikeType);
565565

566566
if (auto countType = T.getRawLayoutSubstitutedCountType()) {
567-
auto loweredCountType = collector.IGF.IGM.getLoweredType(countType);
568-
collector.IGF.IGM.getTypeInfo(loweredCountType)
569-
.collectMetadataForOutlining(collector, loweredCountType);
567+
if (countType->isValueParameter()) {
568+
auto loweredCountType = collector.IGF.IGM.getLoweredType(countType);
569+
collector.IGF.IGM.getTypeInfo(loweredCountType)
570+
.collectMetadataForOutlining(collector, loweredCountType);
571+
}
570572
}
571573
}
572574

0 commit comments

Comments
 (0)