summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Error.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Error.cpp')
-rw-r--r--lld/ELF/Error.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp
index 06aa28120ef..6c9fb090694 100644
--- a/lld/ELF/Error.cpp
+++ b/lld/ELF/Error.cpp
@@ -20,21 +20,22 @@ namespace lld {
bool elf::HasError;
raw_ostream *elf::ErrorOS;
+StringRef elf::Argv0;
void elf::log(const Twine &Msg) {
if (Config->Verbose)
- outs() << Msg << "\n";
+ outs() << Argv0 << ": " << Msg << "\n";
}
void elf::warn(const Twine &Msg) {
if (Config->FatalWarnings)
error(Msg);
else
- *ErrorOS << "warning: " << Msg << "\n";
+ *ErrorOS << Argv0 << ": warning: " << Msg << "\n";
}
void elf::error(const Twine &Msg) {
- *ErrorOS << "error: " << Msg << "\n";
+ *ErrorOS << Argv0 << ": error: " << Msg << "\n";
HasError = true;
}
@@ -43,7 +44,7 @@ void elf::error(std::error_code EC, const Twine &Prefix) {
}
void elf::fatal(const Twine &Msg) {
- *ErrorOS << "error: " << Msg << "\n";
+ *ErrorOS << Argv0 << ": error: " << Msg << "\n";
exit(1);
}
OpenPOWER on IntegriCloud