[clang] [Serialization] Remove an unused local variable (NFC) (PR #141358)

via cfe-commits cfe-commits at lists.llvm.org
Sat May 24 08:28:36 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-modules

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

Note that getTimestampFilename just constructs a file name, so it's
mostly a "pure" function except possible heap allocation.


---
Full diff: https://github.com/llvm/llvm-project/pull/141358.diff


1 Files Affected:

- (modified) clang/lib/Serialization/ModuleCache.cpp (-2) 


``````````diff
diff --git a/clang/lib/Serialization/ModuleCache.cpp b/clang/lib/Serialization/ModuleCache.cpp
index 4ae49c4ec9a05..f42bdc16d815d 100644
--- a/clang/lib/Serialization/ModuleCache.cpp
+++ b/clang/lib/Serialization/ModuleCache.cpp
@@ -34,8 +34,6 @@ class CrossProcessModuleCache : public ModuleCache {
   }
 
   std::time_t getModuleTimestamp(StringRef ModuleFilename) override {
-    std::string TimestampFilename =
-        serialization::ModuleFile::getTimestampFilename(ModuleFilename);
     llvm::sys::fs::file_status Status;
     if (llvm::sys::fs::status(ModuleFilename, Status) != std::error_code{})
       return 0;

``````````

</details>


https://github.com/llvm/llvm-project/pull/141358


More information about the cfe-commits mailing list