aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorNoah Shutty <shutty@google.com>2021-11-04 12:59:59 -0700
committerPetr Hosek <phosek@google.com>2021-11-04 13:00:44 -0700
commitd788c44f5cddb3e73069cd4d965bbf55b0d602d5 (patch)
tree728ea3a88252303ed623da0524b528dea987109d /llvm/lib/LTO/LTOBackend.cpp
parent48dc5c8e731b1198c4ba4b2f08b235c55e6d5aef (diff)
downloadllvm-d788c44f5cddb3e73069cd4d965bbf55b0d602d5.zip
llvm-d788c44f5cddb3e73069cd4d965bbf55b0d602d5.tar.gz
llvm-d788c44f5cddb3e73069cd4d965bbf55b0d602d5.tar.bz2
[Support] Improve Caching conformance with Support library behavior
This diff makes several amendments to the local file caching mechanism which was migrated from ThinLTO to Support in rGe678c51177102845c93529d457b020f969125373 in response to follow-up discussion on that commit. Patch By: noajshu Differential Revision: https://reviews.llvm.org/D113080
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index dfdd6bf..d0e3b45d 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -411,7 +411,10 @@ static void codegen(const Config &Conf, TargetMachine *TM,
EC.message());
}
- auto Stream = AddStream(Task);
+ Expected<std::unique_ptr<CachedFileStream>> StreamOrErr = AddStream(Task);
+ if (Error Err = StreamOrErr.takeError())
+ report_fatal_error(std::move(Err));
+ std::unique_ptr<CachedFileStream> &Stream = *StreamOrErr;
legacy::PassManager CodeGenPasses;
CodeGenPasses.add(
createImmutableModuleSummaryIndexWrapperPass(&CombinedIndex));