mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -1130,6 +1130,7 @@ struct ParserUnit::Implementation {
|
||||
SearchPathOptions SearchPathOpts;
|
||||
ClangImporterOptions clangImporterOpts;
|
||||
symbolgraphgen::SymbolGraphOptions symbolGraphOpts;
|
||||
CASOptions CASOpts;
|
||||
DiagnosticEngine Diags;
|
||||
ASTContext &Ctx;
|
||||
SourceFile *SF;
|
||||
@@ -1138,10 +1139,10 @@ struct ParserUnit::Implementation {
|
||||
Implementation(SourceManager &SM, SourceFileKind SFKind, unsigned BufferID,
|
||||
const LangOptions &Opts, const TypeCheckerOptions &TyOpts,
|
||||
const SILOptions &silOpts, StringRef ModuleName)
|
||||
: LangOpts(Opts),
|
||||
TypeCheckerOpts(TyOpts), SILOpts(silOpts), Diags(SM),
|
||||
: LangOpts(Opts), TypeCheckerOpts(TyOpts), SILOpts(silOpts), Diags(SM),
|
||||
Ctx(*ASTContext::get(LangOpts, TypeCheckerOpts, SILOpts, SearchPathOpts,
|
||||
clangImporterOpts, symbolGraphOpts, SM, Diags)) {
|
||||
clangImporterOpts, symbolGraphOpts, CASOpts, SM,
|
||||
Diags)) {
|
||||
registerParseRequestFunctions(Ctx.evaluator);
|
||||
|
||||
auto parsingOpts = SourceFile::getDefaultParsingOptions(LangOpts);
|
||||
|
||||
Reference in New Issue
Block a user