summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Error.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp
index 59a49c17b97..776fc72a25c 100644
--- a/lld/ELF/Error.cpp
+++ b/lld/ELF/Error.cpp
@@ -17,49 +17,38 @@
using namespace llvm;
namespace lld {
-namespace elf {
-bool HasError;
-raw_ostream *ErrorOS;
+bool elf::HasError;
+raw_ostream *elf::ErrorOS;
-void log(const Twine &Msg) {
+void elf::log(const Twine &Msg) {
if (Config->Verbose)
outs() << Msg << "\n";
}
-void warning(const Twine &Msg) {
+void elf::warning(const Twine &Msg) {
if (Config->FatalWarnings)
error(Msg);
else
*ErrorOS << Msg << "\n";
}
-void error(const Twine &Msg) {
+void elf::error(const Twine &Msg) {
*ErrorOS << Msg << "\n";
HasError = true;
}
-void error(std::error_code EC, const Twine &Prefix) {
+void elf::error(std::error_code EC, const Twine &Prefix) {
error(Prefix + ": " + EC.message());
}
-void fatal(const Twine &Msg) {
+void elf::fatal(const Twine &Msg) {
*ErrorOS << Msg << "\n";
exit(1);
}
-void fatal(const Twine &Msg, const Twine &Prefix) {
+void elf::fatal(const Twine &Msg, const Twine &Prefix) {
fatal(Prefix + ": " + Msg);
}
-void check(std::error_code EC) {
- if (EC)
- fatal(EC.message());
-}
-
-void check(Error Err) {
- check(errorToErrorCode(std::move(Err)));
-}
-
-} // namespace elf
} // namespace lld
OpenPOWER on IntegriCloud