Skip to content

Commit e121cb0

Browse files
committed
Revert "[SourceKit] Disable module system headers validation"
This reverts commit 951b853.
1 parent a34b044 commit e121cb0

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/IDE/CompletionInstance.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ bool swift::ide::CompletionInstance::performOperation(
362362
// source text. That breaks an invariant of syntax tree building.
363363
Invocation.getLangOptions().BuildSyntaxTree = false;
364364

365+
// This validation may call stat(2) many times. Disable it to prevent
366+
// performance regression.
367+
Invocation.getSearchPathOptions().DisableModulesValidateSystemDependencies =
368+
true;
369+
365370
// Since caching uses the interface hash, and since per type fingerprints
366371
// weaken that hash, disable them here:
367372
Invocation.getLangOptions().EnableTypeFingerprints = false;

tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,11 +539,6 @@ bool SwiftASTManager::initCompilerInvocation(
539539
// We don't care about LLVMArgs
540540
FrontendOpts.LLVMArgs.clear();
541541

542-
// This validation may call stat(2) many times. Disable it to prevent
543-
// performance issues.
544-
Invocation.getSearchPathOptions().DisableModulesValidateSystemDependencies =
545-
true;
546-
547542
// SwiftSourceInfo files provide source location information for decls coming
548543
// from loaded modules. For most IDE use cases it either has an undesirable
549544
// impact on performance with no benefit (code completion), results in stale

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3436,8 +3436,6 @@ int main(int argc, char *argv[]) {
34363436
options::DebugForbidTypecheckPrefix;
34373437
InitInvok.getTypeCheckerOptions().DebugConstraintSolver =
34383438
options::DebugConstraintSolver;
3439-
InitInvok.getSearchPathOptions().DisableModulesValidateSystemDependencies =
3440-
true;
34413439

34423440
for (auto ConfigName : options::BuildConfigs)
34433441
InitInvok.getLangOptions().addCustomConditionalCompilationFlag(ConfigName);

0 commit comments

Comments
 (0)