From 8e46e34d243524b9a1f9487718ea60e990b35fa3 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 18 Oct 2021 12:23:52 -0700 Subject: Revert "[Support][ThinLTO] Move ThinLTO caching to LLVM Support library" This reverts commit 92b8cc52bbc8194f2cd6a5f742b874969421afca since it broke the gold plugin. --- llvm/tools/gold/gold-plugin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/tools/gold') diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 7c97053..6bcb1e4 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -1081,11 +1081,12 @@ static std::vector, bool>> runLTO() { size_t MaxTasks = Lto->getMaxTasks(); std::vector, bool>> Files(MaxTasks); - auto AddStream = [&](size_t Task) -> std::unique_ptr { + auto AddStream = + [&](size_t Task) -> std::unique_ptr { Files[Task].second = !SaveTemps; int FD = getOutputFileName(Filename, /* TempOutFile */ !SaveTemps, Files[Task].first, Task); - return std::make_unique( + return std::make_unique( std::make_unique(FD, true)); }; @@ -1095,7 +1096,7 @@ static std::vector, bool>> runLTO() { NativeObjectCache Cache; if (!options::cache_dir.empty()) - Cache = check(localCache("ThinLTO", "Thin", options::cache_dir, AddBuffer)); + Cache = check(localCache(options::cache_dir, AddBuffer)); check(Lto->run(AddStream, Cache)); -- cgit v1.1