Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kazutakahirata
Copy link
Contributor

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

Note that getTimestampFilename just constructs a file name, so it's
mostly a "pure" function except possible heap allocation.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:modules C++20 modules and Clang Header Modules labels May 24, 2025
@llvmbot
Copy link
Member

llvmbot commented May 24, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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;

@llvmbot
Copy link
Member

llvmbot commented May 24, 2025

@llvm/pr-subscribers-clang-modules

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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;

@kazutakahirata kazutakahirata merged commit 3ac2b5c into llvm:main May 24, 2025
14 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250524_unused_local_clang_Serialization branch May 24, 2025 16:39
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Note that getTimestampFilename just constructs a file name, so it's
mostly a "pure" function except possible heap allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants