diff options
author | Kyungwoo Lee <kyulee@meta.com> | 2024-10-04 07:50:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 07:50:28 -0700 |
commit | ed59d571f2704aff4dfdeace57c286a2c6deac74 (patch) | |
tree | eea3089e673bf43c5ab11fd4e5531d85d0d0caa2 /llvm/lib/LTO/LTO.cpp | |
parent | dada3c316d69ab641c9972062745ac16af34533e (diff) | |
download | llvm-ed59d571f2704aff4dfdeace57c286a2c6deac74.zip llvm-ed59d571f2704aff4dfdeace57c286a2c6deac74.tar.gz llvm-ed59d571f2704aff4dfdeace57c286a2c6deac74.tar.bz2 |
[ThinLTO][NFC] Refactor FileCache (#110463)
This is a prep for https://github.com/llvm/llvm-project/pull/90933.
- Change `FileCache` from a function to a type.
- Store the cache directory in the type, which will be used when creating additional caches for two-codegen round runs that inherit this value.
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index f4c25f8..b5eb795 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -1484,7 +1484,7 @@ public: return E; } - if (!Cache || !CombinedIndex.modulePaths().count(ModuleID) || + if (!Cache.isValid() || !CombinedIndex.modulePaths().count(ModuleID) || all_of(CombinedIndex.getModuleHash(ModuleID), [](uint32_t V) { return V == 0; })) // Cache disabled or no entry for this module in the combined index or |