summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LTO.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-03-02 02:02:38 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-03-02 02:02:38 +0000
commitab76a19afb14a4f3330ebc33fddb89db6e7f6ef9 (patch)
treebd7432f3210d093552d82298b35acb9ee94880d2 /lld/ELF/LTO.cpp
parent2f75ad4e519091d16f3f4d373f5b64d263c9b149 (diff)
downloadbcm5719-llvm-ab76a19afb14a4f3330ebc33fddb89db6e7f6ef9.tar.gz
bcm5719-llvm-ab76a19afb14a4f3330ebc33fddb89db6e7f6ef9.zip
LTO: When creating a local cache, create the cache directory if it does not already exist.
Differential Revision: https://reviews.llvm.org/D30519 llvm-svn: 296726
Diffstat (limited to 'lld/ELF/LTO.cpp')
-rw-r--r--lld/ELF/LTO.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 9e271a2c6ed..fa6d711ae3d 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -150,10 +150,10 @@ std::vector<InputFile *> BitcodeCompiler::compile() {
// specified, configure LTO to use it as the cache directory.
lto::NativeObjectCache Cache;
if (!Config->ThinLTOCacheDir.empty())
- Cache = lto::localCache(Config->ThinLTOCacheDir,
- [&](size_t Task, StringRef Path) {
- Files[Task] = check(MemoryBuffer::getFile(Path));
- });
+ Cache = check(lto::localCache(
+ Config->ThinLTOCacheDir, [&](size_t Task, StringRef Path) {
+ Files[Task] = check(MemoryBuffer::getFile(Path));
+ }));
checkError(LTOObj->run(
[&](size_t Task) {
OpenPOWER on IntegriCloud