summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Driver.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index a1c82954d1c..9a6be7dc988 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -254,9 +254,12 @@ void LinkerDriver::main(ArrayRef<const char *> ArgsArr) {
if (!Config->Reproduce.empty()) {
std::error_code EC;
- ReproduceArchive = llvm::make_unique<raw_fd_ostream>(
- Config->Reproduce + ".cpio", EC, fs::F_None);
- check(EC);
+ std::string File = Config->Reproduce + ".cpio";
+ ReproduceArchive = llvm::make_unique<raw_fd_ostream>(File, EC, fs::F_None);
+ if (EC) {
+ error(EC, "--reproduce: failed to open " + File);
+ return;
+ }
createResponseFile(Args);
}
OpenPOWER on IntegriCloud