Revert "[SourceKit] Disable module system headers validation"

This reverts commit 951b85359a.
This commit is contained in:
Rintaro Ishizaki
2020-01-30 15:04:07 -08:00
parent a34b044889
commit e121cb09cd
3 changed files with 5 additions and 7 deletions

View File

@@ -362,6 +362,11 @@ bool swift::ide::CompletionInstance::performOperation(
// source text. That breaks an invariant of syntax tree building. // source text. That breaks an invariant of syntax tree building.
Invocation.getLangOptions().BuildSyntaxTree = false; Invocation.getLangOptions().BuildSyntaxTree = false;
// This validation may call stat(2) many times. Disable it to prevent
// performance regression.
Invocation.getSearchPathOptions().DisableModulesValidateSystemDependencies =
true;
// Since caching uses the interface hash, and since per type fingerprints // Since caching uses the interface hash, and since per type fingerprints
// weaken that hash, disable them here: // weaken that hash, disable them here:
Invocation.getLangOptions().EnableTypeFingerprints = false; Invocation.getLangOptions().EnableTypeFingerprints = false;

View File

@@ -539,11 +539,6 @@ bool SwiftASTManager::initCompilerInvocation(
// We don't care about LLVMArgs // We don't care about LLVMArgs
FrontendOpts.LLVMArgs.clear(); FrontendOpts.LLVMArgs.clear();
// This validation may call stat(2) many times. Disable it to prevent
// performance issues.
Invocation.getSearchPathOptions().DisableModulesValidateSystemDependencies =
true;
// SwiftSourceInfo files provide source location information for decls coming // SwiftSourceInfo files provide source location information for decls coming
// from loaded modules. For most IDE use cases it either has an undesirable // from loaded modules. For most IDE use cases it either has an undesirable
// impact on performance with no benefit (code completion), results in stale // impact on performance with no benefit (code completion), results in stale

View File

@@ -3436,8 +3436,6 @@ int main(int argc, char *argv[]) {
options::DebugForbidTypecheckPrefix; options::DebugForbidTypecheckPrefix;
InitInvok.getTypeCheckerOptions().DebugConstraintSolver = InitInvok.getTypeCheckerOptions().DebugConstraintSolver =
options::DebugConstraintSolver; options::DebugConstraintSolver;
InitInvok.getSearchPathOptions().DisableModulesValidateSystemDependencies =
true;
for (auto ConfigName : options::BuildConfigs) for (auto ConfigName : options::BuildConfigs)
InitInvok.getLangOptions().addCustomConditionalCompilationFlag(ConfigName); InitInvok.getLangOptions().addCustomConditionalCompilationFlag(ConfigName);