We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5608520 commit 6ad9684Copy full SHA for 6ad9684
lib/IRGen/GenDecl.cpp
@@ -5123,9 +5123,12 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
5123
// trigger lazy emission of the metadata.
5124
if (NominalTypeDecl *nominal = concreteType->getAnyNominal()) {
5125
IRGen.noteUseOfTypeMetadata(nominal);
5126
- if (auto *classDecl = dyn_cast<ClassDecl>(nominal)) {
5127
- if (classDecl->isGenericContext()) {
5128
- IRGen.noteUseOfSpecializedClassMetadata(concreteType);
+
+ if (Context.LangOpts.hasFeature(Feature::Embedded)) {
+ if (auto *classDecl = dyn_cast<ClassDecl>(nominal)) {
5129
+ if (classDecl->isGenericContext()) {
5130
+ IRGen.noteUseOfSpecializedClassMetadata(concreteType);
5131
+ }
5132
}
5133
5134
0 commit comments