summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Error.cpp4
-rw-r--r--lld/ELF/Error.h5
2 files changed, 2 insertions, 7 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp
index 07e99b63b2e..4649331a8f9 100644
--- a/lld/ELF/Error.cpp
+++ b/lld/ELF/Error.cpp
@@ -47,8 +47,4 @@ void elf::fatal(const Twine &Msg) {
exit(1);
}
-void elf::fatal(const Twine &Msg, const Twine &Prefix) {
- fatal(Prefix + ": " + Msg);
-}
-
} // namespace lld
diff --git a/lld/ELF/Error.h b/lld/ELF/Error.h
index c5c5df774cb..61a0aeb1b1d 100644
--- a/lld/ELF/Error.h
+++ b/lld/ELF/Error.h
@@ -45,7 +45,6 @@ template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) {
}
LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg);
-LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg, const Twine &Prefix);
template <class T> T check(ErrorOr<T> E) {
if (auto EC = E.getError())
@@ -61,13 +60,13 @@ template <class T> T check(Expected<T> E) {
template <class T> T check(ErrorOr<T> E, const Twine &Prefix) {
if (auto EC = E.getError())
- fatal(EC.message(), Prefix);
+ fatal(Prefix + ": " + EC.message());
return std::move(*E);
}
template <class T> T check(Expected<T> E, const Twine &Prefix) {
if (!E)
- fatal(errorToErrorCode(E.takeError()).message(), Prefix);
+ fatal(Prefix + ": " + errorToErrorCode(E.takeError()).message());
return std::move(*E);
}
OpenPOWER on IntegriCloud