Skip to content

Commit 4624858

Browse files
authored
Merge pull request #19346 from compnerd/frontend-order
Frontend: force order of evaluation
2 parents e0247a6 + 597b4ae commit 4624858

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Frontend/Frontend.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,9 @@ void CompilerInstance::performSemaUpTo(SourceFile::ASTStage_t LimitStage) {
517517
}
518518

519519
FrontendStatsTracer tracer(Context->Stats, "perform-sema");
520-
Context->LoadedModules[MainModule->getName()] = getMainModule();
520+
521+
ModuleDecl *mainModule = getMainModule();
522+
Context->LoadedModules[mainModule->getName()] = mainModule;
521523

522524
if (Invocation.getInputKind() == InputFileKind::SIL) {
523525
assert(!InputSourceCodeBufferIDs.empty());

0 commit comments

Comments
 (0)