diff --git a/lib/ClangImporter/ImportDecl.cpp b/lib/ClangImporter/ImportDecl.cpp index ffdf8b00618ce..9efee131c4915 100644 --- a/lib/ClangImporter/ImportDecl.cpp +++ b/lib/ClangImporter/ImportDecl.cpp @@ -4993,27 +4993,6 @@ namespace { } result->setSuperclass(superclassType); - // Mark the class as runtime-only if it is named 'OS_object', even - // if it doesn't have the runtime-only Clang attribute. This is a - // targeted fix allowing IRGen to emit convenience initializers - // correctly. - // - // FIXME: Remove this once SILGen gets proper support for factory - // initializers. - if (decl->getName() == "OS_object" || - decl->getName() == "OS_os_log") { - result->setForeignClassKind(ClassDecl::ForeignKind::RuntimeOnly); - } - - // If the superclass is runtime-only, our class is also. This only - // matters in the case above. - if (superclassType) { - auto superclassDecl = cast(superclassType->getAnyNominal()); - auto kind = superclassDecl->getForeignClassKind(); - if (kind != ClassDecl::ForeignKind::Normal) - result->setForeignClassKind(kind); - } - // Import protocols this class conforms to. importObjCProtocols(result, decl->getReferencedProtocols(), inheritedTypes);