1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-26 18:02:30 +03:00

Add "mold: " prefix for all error and warning messages

This commit is contained in:
Rui Ueyama 2021-05-21 09:22:21 +09:00
parent eb78d185f1
commit b100f6a486

6
mold.h
View File

@ -1589,7 +1589,9 @@ private:
template <typename E>
class Fatal {
public:
Fatal(Context<E> &ctx) : out(ctx, std::cerr) {}
Fatal(Context<E> &ctx) : out(ctx, std::cerr) {
out << "mold: ";
}
[[noreturn]] ~Fatal() {
out.~SyncOut();
@ -1610,6 +1612,7 @@ template <typename E>
class Error {
public:
Error(Context<E> &ctx) : out(ctx, std::cerr) {
out << "mold: ";
ctx.has_error = true;
}
@ -1633,6 +1636,7 @@ template <typename E>
class Warn {
public:
Warn(Context<E> &ctx) : out(ctx, std::cerr) {
out << "mold: ";
if (ctx.arg.fatal_warnings)
ctx.has_error = true;
}