Author: Haohai Wen
Date: 2026-11-19T09:20:27+08:00
New Revision: 69d5d17a8ce22ffa1dba34e74dbb0ca6a1250aa4

URL: 
https://github.com/llvm/llvm-project/commit/69d5d17a8ce22ffa1dba34e74dbb0ca6a1250aa4
DIFF: 
https://github.com/llvm/llvm-project/commit/69d5d17a8ce22ffa1dba34e74dbb0ca6a1250aa4.diff

LOG: [clang][Modules] Fix unused AccessTimeRefreshInterval on Windows (#243847)

635f30899dd0 (#239747) uses AccessTimeRefreshInterval only in the
non-Windows path of refreshAccessTime, so Windows builds with -Werror
fail with -Wunused-const-variable. Define it under the same #ifndef
_WIN32 as its use.

Added: 
    

Modified: 
    clang/lib/Serialization/ModuleCache.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ModuleCache.cpp 
b/clang/lib/Serialization/ModuleCache.cpp
index addda10ad9e85..cc3ce8914930e 100644
--- a/clang/lib/Serialization/ModuleCache.cpp
+++ b/clang/lib/Serialization/ModuleCache.cpp
@@ -231,9 +231,11 @@ clang::writeImpl(StringRef Path, llvm::MemoryBufferRef 
Buffer, off_t &Size,
   return std::move(Written);
 }
 
+#ifndef _WIN32
 /// The access time of a module file is only refreshed explicitly when it is
 /// older than this interval so we avoid frequent yet unnecessary updates.
 static constexpr std::chrono::seconds AccessTimeRefreshInterval(60);
+#endif
 
 /// Record that the module file open as \p FD has just been used by setting its
 /// access time to now, if it is older than AccessTimeRefreshInterval. Module


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to