diff options
author | Petr Hosek <phosek@google.com> | 2021-10-18 12:23:52 -0700 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2021-10-18 12:24:05 -0700 |
commit | 8e46e34d243524b9a1f9487718ea60e990b35fa3 (patch) | |
tree | 142c081e7fac5e7db1c014af9527b622ffa6049d /llvm/tools/gold | |
parent | 25107cc8b1f77cddd5eaddddcbe27ad387abd9d8 (diff) | |
download | llvm-8e46e34d243524b9a1f9487718ea60e990b35fa3.zip llvm-8e46e34d243524b9a1f9487718ea60e990b35fa3.tar.gz llvm-8e46e34d243524b9a1f9487718ea60e990b35fa3.tar.bz2 |
Revert "[Support][ThinLTO] Move ThinLTO caching to LLVM Support library"
This reverts commit 92b8cc52bbc8194f2cd6a5f742b874969421afca since
it broke the gold plugin.
Diffstat (limited to 'llvm/tools/gold')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<std::pair<SmallString<128>, bool>> runLTO() { size_t MaxTasks = Lto->getMaxTasks(); std::vector<std::pair<SmallString<128>, bool>> Files(MaxTasks); - auto AddStream = [&](size_t Task) -> std::unique_ptr<NativeObjectStream> { + auto AddStream = + [&](size_t Task) -> std::unique_ptr<lto::NativeObjectStream> { Files[Task].second = !SaveTemps; int FD = getOutputFileName(Filename, /* TempOutFile */ !SaveTemps, Files[Task].first, Task); - return std::make_unique<NativeObjectStream>( + return std::make_unique<lto::NativeObjectStream>( std::make_unique<llvm::raw_fd_ostream>(FD, true)); }; @@ -1095,7 +1096,7 @@ static std::vector<std::pair<SmallString<128>, 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)); |