mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend][Index] Add frontend option to skip indexing the stdlib (for test performance)
Several tests related to indexing system modules were taking a considerable amount of time (100+ seconds in the worst case) indexing the standard library. This adds a frontend option to skip it and updates those tests to pass it.
This commit is contained in:
@@ -1729,7 +1729,8 @@ static bool emitIndexDataIfNeeded(SourceFile *PrimarySourceFile,
|
||||
PrimarySourceFile->getFilename());
|
||||
if (index::indexAndRecord(PrimarySourceFile, PSPs.OutputFilename,
|
||||
opts.IndexStorePath, opts.IndexSystemModules,
|
||||
isDebugCompilation, Invocation.getTargetTriple(),
|
||||
opts.IndexIgnoreStdlib, isDebugCompilation,
|
||||
Invocation.getTargetTriple(),
|
||||
*Instance.getDependencyTracker())) {
|
||||
return true;
|
||||
}
|
||||
@@ -1741,7 +1742,7 @@ static bool emitIndexDataIfNeeded(SourceFile *PrimarySourceFile,
|
||||
|
||||
if (index::indexAndRecord(Instance.getMainModule(), opts.InputsAndOutputs.copyOutputFilenames(),
|
||||
moduleToken, opts.IndexStorePath,
|
||||
opts.IndexSystemModules,
|
||||
opts.IndexSystemModules, opts.IndexIgnoreStdlib,
|
||||
isDebugCompilation, Invocation.getTargetTriple(),
|
||||
*Instance.getDependencyTracker())) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user