mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IRGen] Maintain the prior use of isForeign() for identifying foreign classes.
This commit is contained in:
@@ -5257,7 +5257,7 @@ namespace {
|
|||||||
bool IRGenModule::requiresForeignTypeMetadata(CanType type) {
|
bool IRGenModule::requiresForeignTypeMetadata(CanType type) {
|
||||||
if (NominalTypeDecl *nominal = type->getAnyNominal()) {
|
if (NominalTypeDecl *nominal = type->getAnyNominal()) {
|
||||||
if (auto *clas = dyn_cast<ClassDecl>(nominal)) {
|
if (auto *clas = dyn_cast<ClassDecl>(nominal)) {
|
||||||
return clas->getForeignClassKind() == ClassDecl::ForeignKind::CFType;
|
return clas->isForeign();
|
||||||
}
|
}
|
||||||
|
|
||||||
return isa<ClangModuleUnit>(nominal->getModuleScopeContext());
|
return isa<ClangModuleUnit>(nominal->getModuleScopeContext());
|
||||||
|
|||||||
Reference in New Issue
Block a user