mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Move some deployment target checks to LangOptions
This commit is contained in:
@@ -814,15 +814,8 @@ void IRGenerator::addClassForEagerInitialization(ClassDecl *ClassDecl) {
|
||||
if (!ClassDecl->getAttrs().hasAttribute<StaticInitializeObjCMetadataAttr>())
|
||||
return;
|
||||
|
||||
// Exclude some classes where those attributes make no sense but could be set
|
||||
// for some reason. Just to be on the safe side.
|
||||
Type ClassTy = ClassDecl->getDeclaredType();
|
||||
if (ClassTy->is<UnboundGenericType>())
|
||||
return;
|
||||
if (ClassTy->hasArchetype())
|
||||
return;
|
||||
if (ClassDecl->hasClangNode())
|
||||
return;
|
||||
assert(!ClassDecl->isGenericContext());
|
||||
assert(!ClassDecl->hasClangNode());
|
||||
|
||||
ClassesForEagerInitialization.push_back(ClassDecl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user