diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-03-13 04:25:43 +0000 | 
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-03-13 04:25:43 +0000 | 
| commit | 860b13fc02009d4ca9bf62d17a35ec0b34561ae9 (patch) | |
| tree | 4e15f0ac0a95c506c3706627c1098f624ededbb8 | |
| parent | 6eafa7fb23a623c959a568dcfa3293fcd53ea7c6 (diff) | |
| download | bcm5719-llvm-860b13fc02009d4ca9bf62d17a35ec0b34561ae9.tar.gz bcm5719-llvm-860b13fc02009d4ca9bf62d17a35ec0b34561ae9.zip  | |
Remove dead code.
llvm-svn: 263363
| -rw-r--r-- | lld/ELF/Error.cpp | 5 | ||||
| -rw-r--r-- | lld/ELF/Error.h | 8 | 
2 files changed, 2 insertions, 11 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index beda4af658c..991ec97d056 100644 --- a/lld/ELF/Error.cpp +++ b/lld/ELF/Error.cpp @@ -36,11 +36,6 @@ void error(std::error_code EC, const Twine &Prefix) {      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); diff --git a/lld/ELF/Error.h b/lld/ELF/Error.h index 05a3e0a56a9..afa51b98606 100644 --- a/lld/ELF/Error.h +++ b/lld/ELF/Error.h @@ -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) {  | 

