[lld] r263363 - Remove dead code.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 20:25:44 PST 2016


Author: ruiu
Date: Sat Mar 12 22:25:43 2016
New Revision: 263363

URL: http://llvm.org/viewvc/llvm-project?rev=263363&view=rev
Log:
Remove dead code.

Modified:
    lld/trunk/ELF/Error.cpp
    lld/trunk/ELF/Error.h

Modified: lld/trunk/ELF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.cpp?rev=263363&r1=263362&r2=263363&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Sat Mar 12 22:25:43 2016
@@ -36,11 +36,6 @@ void error(std::error_code EC, const Twi
     error(Prefix + ": " + EC.message());
 }
 
-void error(std::error_code EC) {
-  if (EC)
-    error(EC.message());
-}
-
 void fatal(const Twine &Msg) {
   llvm::errs() << Msg << "\n";
   exit(1);

Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=263363&r1=263362&r2=263363&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Sat Mar 12 22:25:43 2016
@@ -23,18 +23,14 @@ void warning(const Twine &Msg);
 
 void error(const Twine &Msg);
 void error(std::error_code EC, const Twine &Prefix);
-void error(std::error_code EC);
 
 template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) {
-  return error(V.getError(), Prefix);
-}
-
-template <typename T> void error(const ErrorOr<T> &V) {
-  return error(V.getError());
+  error(V.getError(), Prefix);
 }
 
 LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg);
 LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg, const Twine &Prefix);
+
 void check(std::error_code EC);
 
 template <class T> T check(ErrorOr<T> EO) {




More information about the llvm-commits mailing list