diff options
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r-- | lld/ELF/LTO.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index fa6d711ae3d..83ae235b970 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -150,10 +150,11 @@ std::vector<InputFile *> BitcodeCompiler::compile() { // specified, configure LTO to use it as the cache directory. lto::NativeObjectCache Cache; if (!Config->ThinLTOCacheDir.empty()) - Cache = check(lto::localCache( - Config->ThinLTOCacheDir, [&](size_t Task, StringRef Path) { - Files[Task] = check(MemoryBuffer::getFile(Path)); - })); + Cache = check( + lto::localCache(Config->ThinLTOCacheDir, + [&](size_t Task, std::unique_ptr<MemoryBuffer> MB) { + Files[Task] = std::move(MB); + })); checkError(LTOObj->run( [&](size_t Task) { |