diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-05-07 14:02:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-07 14:02:40 -0700 |
commit | 1698beb5420f6e6f7eed5d9914ab6a10ff5f4b1f (patch) | |
tree | a007e3f26b36f6c35698ff1a599e9c758477bab9 /clang/lib/Serialization/ASTWriter.cpp | |
parent | b8461acc5eb41ced70cc5c7f5a324cfd8bf76403 (diff) | |
download | llvm-1698beb5420f6e6f7eed5d9914ab6a10ff5f4b1f.zip llvm-1698beb5420f6e6f7eed5d9914ab6a10ff5f4b1f.tar.gz llvm-1698beb5420f6e6f7eed5d9914ab6a10ff5f4b1f.tar.bz2 |
[clang][modules][deps] Optimize in-process timestamping of PCMs (#137363)
In the past, timestamps used for
`-fmodules-validate-once-per-build-session` were found to be a source of
contention in the dependency scanner
([D149802](https://reviews.llvm.org/D149802),
https://github.com/llvm/llvm-project/pull/112452). This PR is yet
another attempt to optimize these. We now make use of the new
`ModuleCache` interface to implement the in-process version in terms of
atomic `std::time_t` variables rather the mtime attribute on
`.timestamp` files.
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 8c5adc3..cccf53d 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -5394,7 +5394,7 @@ ASTWriter::WriteAST(llvm::PointerUnion<Sema *, Preprocessor *> Subject, if (WritingModule && PPRef.getHeaderSearchInfo() .getHeaderSearchOpts() .ModulesValidateOncePerBuildSession) - updateModuleTimestamp(OutputFile); + ModCache.updateModuleTimestamp(OutputFile); if (ShouldCacheASTInMemory) { // Construct MemoryBuffer and update buffer manager. |