[lld] r275858 - Delete dead code.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 11:24:42 PDT 2016
Author: rafael
Date: Mon Jul 18 13:24:41 2016
New Revision: 275858
URL: http://llvm.org/viewvc/llvm-project?rev=275858&view=rev
Log:
Delete dead code.
And make it easier to spot code going dead by using elf::.
Modified:
lld/trunk/ELF/Error.cpp
Modified: lld/trunk/ELF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.cpp?rev=275858&r1=275857&r2=275858&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Mon Jul 18 13:24:41 2016
@@ -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
More information about the llvm-commits
mailing list