forked from OSchip/llvm-project
lld: Include name of output file in "failed to write output" diag
Differential Revision: https://reviews.llvm.org/D133110
This commit is contained in:
parent
3b44c9af8e
commit
cd7ffa2e52
|
@ -648,7 +648,8 @@ void Writer::run() {
|
|||
|
||||
ScopedTimer t2(ctx.outputCommitTimer);
|
||||
if (auto e = buffer->commit())
|
||||
fatal("failed to write the output file: " + toString(std::move(e)));
|
||||
fatal("failed to write output '" + buffer->getPath() +
|
||||
"': " + toString(std::move(e)));
|
||||
}
|
||||
|
||||
static StringRef getOutputSectionName(StringRef name) {
|
||||
|
|
|
@ -589,7 +589,8 @@ template <class ELFT> void Writer<ELFT>::run() {
|
|||
return;
|
||||
|
||||
if (auto e = buffer->commit())
|
||||
error("failed to write to the output file: " + toString(std::move(e)));
|
||||
fatal("failed to write output '" + buffer->getPath() +
|
||||
"': " + toString(std::move(e)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1118,7 +1118,8 @@ void Writer::writeOutputFile() {
|
|||
writeCodeSignature();
|
||||
|
||||
if (auto e = buffer->commit())
|
||||
error("failed to write to the output file: " + toString(std::move(e)));
|
||||
fatal("failed to write output '" + buffer->getPath() +
|
||||
"': " + toString(std::move(e)));
|
||||
}
|
||||
|
||||
template <class LP> void Writer::run() {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
# RUN: %python %s %t.o 7
|
||||
# RUN: not %python %s %t.o 3 2>&1 | FileCheck %s
|
||||
# CHECK: error: failed to write to the output file
|
||||
# CHECK: error: failed to write output '{{.*}}': {{.*}}
|
||||
|
||||
import contextlib
|
||||
import ctypes
|
||||
|
|
|
@ -1661,7 +1661,8 @@ void Writer::run() {
|
|||
return;
|
||||
|
||||
if (Error e = buffer->commit())
|
||||
fatal("failed to write the output file: " + toString(std::move(e)));
|
||||
fatal("failed to write output '" + buffer->getPath() +
|
||||
"': " + toString(std::move(e)));
|
||||
}
|
||||
|
||||
// Open a result file.
|
||||
|
|
Loading…
Reference in New Issue