Handle errors on file opening as soft error.
Also improves the error message. Previously it would just print out the cause (e.g. "permission denied"). Now it prints out something like "--reproduce: failed to open foo.cpio: permission denied". llvm-svn: 268551
This commit is contained in:
parent
7e8c285814
commit
0cfed297de
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue