[IRGen] Maintain the prior use of isForeign() for identifying foreign classes.

This commit is contained in:
Doug Gregor
2018-01-19 23:31:56 -08:00
parent 817c0b368e
commit ca76c76272

View File

@@ -5257,7 +5257,7 @@ namespace {
bool IRGenModule::requiresForeignTypeMetadata(CanType type) {
if (NominalTypeDecl *nominal = type->getAnyNominal()) {
if (auto *clas = dyn_cast<ClassDecl>(nominal)) {
return clas->getForeignClassKind() == ClassDecl::ForeignKind::CFType;
return clas->isForeign();
}
return isa<ClangModuleUnit>(nominal->getModuleScopeContext());