[PATCH] D136769: [LTO] Fix lto_module_create_in_codegen_context return value on error
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 15:15:16 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG76ebaf263b20: [LTO] Fix lto_module_create_in_codegen_context return value on error (authored by steven_wu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136769/new/
https://reviews.llvm.org/D136769
Files:
llvm/tools/lto/lto.cpp
Index: llvm/tools/lto/lto.cpp
===================================================================
--- llvm/tools/lto/lto.cpp
+++ llvm/tools/lto/lto.cpp
@@ -290,6 +290,8 @@
codegen::InitTargetOptionsFromCodeGenFlags(Triple());
ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createFromBuffer(
unwrap(cg)->getContext(), mem, length, Options, StringRef(path));
+ if (!M)
+ return nullptr;
return wrap(M->release());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136769.470954.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221026/83fc6571/attachment.bin>
More information about the llvm-commits
mailing list