Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag (#39516)

* Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag

This includes a bit in the module format to represent if the module was
compiled with -enable-ossa-modules flag. When compiling a client module
with -enable-ossa-modules flag, all dependent modules are checked for this bit,
if not on, recompilation is triggered with -enable-ossa-modules.

* Updated tests
This commit is contained in:
Meghana Gupta
2021-10-04 18:46:40 -07:00
committed by GitHub
parent b3416247f5
commit f458d9b490
36 changed files with 213 additions and 173 deletions

View File

@@ -716,14 +716,11 @@ public:
SM, BufferID, CompInv.getMainFileSyntaxParsingCache(), syntaxArena);
}
Parser.reset(
new ParserUnit(SM, SourceFileKind::Main, BufferID,
CompInv.getLangOptions(),
CompInv.getTypeCheckerOptions(),
CompInv.getModuleName(),
SynTreeCreator,
CompInv.getMainFileSyntaxParsingCache())
);
Parser.reset(new ParserUnit(
SM, SourceFileKind::Main, BufferID, CompInv.getLangOptions(),
CompInv.getTypeCheckerOptions(), CompInv.getSILOptions(),
CompInv.getModuleName(), SynTreeCreator,
CompInv.getMainFileSyntaxParsingCache()));
registerParseRequestFunctions(Parser->getParser().Context.evaluator);
registerTypeCheckerRequestFunctions(