Skip to content

Commit d80b4f4

Browse files
Nuri AmariNuriAmari
authored andcommitted
[Swift-ObjC-Interop] Speculative cyclic lookup fix
The lookup to resolve an ObjC forward declaration to its potential native Swift definition within a mixed module is becoming cyclic somehow. The old uncached lookup still works, so it seems this is an issue with cache invalidation somehow. Until the route of the issue, never mark the cache as populated. This is the same behaviour as before the cached lookup was introduced, but we can easily turn the caching back on later.
1 parent 52ff987 commit d80b4f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/Module.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,9 @@ void ModuleDecl::populateObjCNameLookupCache() {
13261326
}
13271327
}
13281328

1329-
setIsObjCNameLookupCachePopulated(true);
1329+
// TODO: Caching these lookups is causing cyclic lookups, renable
1330+
// the caching once the issue is identified
1331+
/* setIsObjCNameLookupCachePopulated(true); */
13301332
}
13311333

13321334
void SourceFile::getTopLevelDecls(SmallVectorImpl<Decl*> &Results) const {

0 commit comments

Comments
 (0)