Skip to content

Commit c653b9e

Browse files
committed
PrintAsObjC: Update for primitive AnyObject
1 parent 214c7f8 commit c653b9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/PrintAsObjC/PrintAsObjC.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ static bool isNSObjectOrAnyHashable(ASTContext &ctx, Type type) {
5353
classDecl->getModuleContext()->getName() == ctx.Id_ObjectiveC;
5454
}
5555
if (auto nomDecl = type->getAnyNominal()) {
56-
return nomDecl->getName() == ctx.getIdentifier("AnyHashable") &&
57-
nomDecl->getModuleContext() == ctx.getStdlibModule();
56+
return nomDecl == ctx.getAnyHashableDecl();
5857
}
5958

6059
return false;
@@ -1996,7 +1995,8 @@ class ModuleWriter {
19961995

19971996
if (otherModule == &M)
19981997
return false;
1999-
if (otherModule->isStdlibModule())
1998+
if (otherModule->isStdlibModule() ||
1999+
otherModule->isBuiltinModule())
20002000
return true;
20012001
// Don't need a module for SIMD types in C.
20022002
if (otherModule->getName() == M.getASTContext().Id_simd)

0 commit comments

Comments
 (0)