Skip to content

Commit 6ad9684

Browse files
committed
[embedded] only track specialized class metadata in embedded mode
1 parent 5608520 commit 6ad9684

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,9 +5123,12 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
51235123
// trigger lazy emission of the metadata.
51245124
if (NominalTypeDecl *nominal = concreteType->getAnyNominal()) {
51255125
IRGen.noteUseOfTypeMetadata(nominal);
5126-
if (auto *classDecl = dyn_cast<ClassDecl>(nominal)) {
5127-
if (classDecl->isGenericContext()) {
5128-
IRGen.noteUseOfSpecializedClassMetadata(concreteType);
5126+
5127+
if (Context.LangOpts.hasFeature(Feature::Embedded)) {
5128+
if (auto *classDecl = dyn_cast<ClassDecl>(nominal)) {
5129+
if (classDecl->isGenericContext()) {
5130+
IRGen.noteUseOfSpecializedClassMetadata(concreteType);
5131+
}
51295132
}
51305133
}
51315134
}

0 commit comments

Comments
 (0)