mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
Conflicts: lib/Frontend/CompilerInvocation.cpp - legacy pass manager removed
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user