[Caching][NFC] Restructure CASOption in swift. NFC

Clean up how CASOptions are kept and passed inside swift to make the
code more readable. Also avoid a copy of CAS configuration in
ClangImporter.
This commit is contained in:
Steven Wu
2024-02-08 16:51:14 -08:00
parent 71640be109
commit 3986937e03
35 changed files with 293 additions and 217 deletions

View File

@@ -81,9 +81,10 @@ struct LibParseExecutor {
SearchPathOptions searchPathOpts;
ClangImporterOptions clangOpts;
symbolgraphgen::SymbolGraphOptions symbolOpts;
CASOptions casOpts;
std::unique_ptr<ASTContext> ctx(
ASTContext::get(langOpts, typeckOpts, silOpts, searchPathOpts,
clangOpts, symbolOpts, SM, diagEngine));
clangOpts, symbolOpts, casOpts, SM, diagEngine));
SourceFile::ParsingOptions parseOpts;
parseOpts |= SourceFile::ParsingFlags::DisablePoundIfEvaluation;
@@ -150,6 +151,7 @@ struct ASTGenExecutor {
SILOptions silOpts;
SearchPathOptions searchPathOpts;
ClangImporterOptions clangOpts;
CASOptions casOpts;
symbolgraphgen::SymbolGraphOptions symbolOpts;
// Enable ASTGen.
@@ -157,7 +159,7 @@ struct ASTGenExecutor {
std::unique_ptr<ASTContext> ctx(
ASTContext::get(langOpts, typeckOpts, silOpts, searchPathOpts,
clangOpts, symbolOpts, SM, diagEngine));
clangOpts, symbolOpts, casOpts, SM, diagEngine));
registerParseRequestFunctions(ctx->evaluator);
registerTypeCheckerRequestFunctions(ctx->evaluator);