Skip to content

Commit 422c7b9

Browse files
Merge pull request swiftlang#28351 from bcardosolopes/master-hash-input
[ClangImporter] Hash content for validation when using clang modules
2 parents d95ed8c + c362e92 commit 422c7b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@ ClangImporter::create(ASTContext &ctx, const ClangImporterOptions &importerOpts,
10711071
// read them later.
10721072
instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true;
10731073

1074+
// Make sure to not trigger extra rebuilds on identical files with mismatching
1075+
// timestamps.
1076+
instance.getHeaderSearchOpts().ValidateASTInputFilesContent = true;
1077+
10741078
if (importerOpts.Mode == ClangImporterOptions::Modes::PrecompiledModule)
10751079
return importer;
10761080

0 commit comments

Comments
 (0)