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

Conflicts:
  lib/Frontend/CompilerInvocation.cpp - legacy pass manager removed
This commit is contained in:
Ben Barham
2022-12-07 10:13:47 -08:00
102 changed files with 377 additions and 228 deletions

View File

@@ -1895,6 +1895,17 @@ void IRGenerator::addGenModule(SourceFile *SF, IRGenModule *IGM) {
Queue.push_back(IGM);
}
IRGenModule *IRGenerator::getGenModule(SourceFile *SF) {
// If we're emitting for a single module, or a single file, we always use the
// primary IGM.
if (GenModules.size() == 1)
return getPrimaryIGM();
IRGenModule *IGM = GenModules[SF];
assert(IGM);
return IGM;
}
IRGenModule *IRGenerator::getGenModule(DeclContext *ctxt) {
if (GenModules.size() == 1 || !ctxt) {
return getPrimaryIGM();