Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2023-02-08 19:33:03 -08:00
5 changed files with 26 additions and 3 deletions

View File

@@ -1922,10 +1922,11 @@ IRGenModule *IRGenerator::getGenModule(DeclContext *ctxt) {
if (GenModules.size() == 1 || !ctxt) {
return getPrimaryIGM();
}
SourceFile *SF = ctxt->getParentSourceFile();
SourceFile *SF = ctxt->getOutermostParentSourceFile();
if (!SF) {
return getPrimaryIGM();
}
IRGenModule *IGM = GenModules[SF];
assert(IGM);
return IGM;