summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Error.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Error.h')
-rw-r--r--lld/ELF/Error.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lld/ELF/Error.h b/lld/ELF/Error.h
index b1d2e7a8fc5..3b6aa693ec8 100644
--- a/lld/ELF/Error.h
+++ b/lld/ELF/Error.h
@@ -15,9 +15,11 @@
namespace lld {
namespace elf2 {
+extern bool HasError;
+
void warning(const Twine &Msg);
-LLVM_ATTRIBUTE_NORETURN void error(const Twine &Msg);
+void error(const Twine &Msg);
void error(std::error_code EC, const Twine &Prefix);
void error(std::error_code EC);
@@ -26,6 +28,15 @@ template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) {
}
template <typename T> void error(const ErrorOr<T> &V) { error(V.getError()); }
+LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg);
+void fatal(std::error_code EC, const Twine &Prefix);
+void fatal(std::error_code EC);
+
+template <typename T> void fatal(const ErrorOr<T> &V, const Twine &Prefix) {
+ fatal(V.getError(), Prefix);
+}
+template <typename T> void fatal(const ErrorOr<T> &V) { fatal(V.getError()); }
+
} // namespace elf2
} // namespace lld
OpenPOWER on IntegriCloud