[PATCH] D24622: LTO: Simplify caching interface.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 12:14:51 PDT 2016


pcc added inline comments.

================
Comment at: tools/gold/gold-plugin.cpp:801
@@ -800,3 +785,1 @@
                       MaxTasks > 1 ? Task : -1);
-    IsTemporary[Task] = !SaveTemps && options::cache_dir.empty();
-    if (options::cache_dir.empty())
----------------
tejohnson wrote:
> Removing the "&& options::cache_dir.empty()" seems like it would cause gold-plugin to remove the cache file, which is why I added that here when I added caching.
The only files created by AddStream are temporary (modulo save-temps), which means that they cannot be cache files.

(On a related note I just noticed that this patch also fixes a bug in the old code: if an output was cached gold would create an unused temporary file.)


https://reviews.llvm.org/D24622





More information about the llvm-commits mailing list