[lld] r291766 - [ELF] avoid 'invalid-noreturn' error.

Eric Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 05:13:33 PST 2017


Author: ioeric
Date: Thu Jan 12 07:13:32 2017
New Revision: 291766

URL: http://llvm.org/viewvc/llvm-project?rev=291766&view=rev
Log:
[ELF] avoid 'invalid-noreturn' error.

Summary: elf::fatal is declared "noreturn".

Reviewers: grimar

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28607

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=291766&r1=291765&r2=291766&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Thu Jan 12 07:13:32 2017
@@ -104,9 +104,7 @@ void elf::fatal(std::error_code EC, cons
 }
 
 void elf::fatal(Error &E, const Twine &Prefix) {
-  handleAllErrors(std::move(E), [&](llvm::ErrorInfoBase &EI) {
-    fatal(Prefix + ": " + EI.message());
-  });
+  fatal(Prefix + ": " + llvm::toString(std::move(E)));
 }
 
 } // namespace lld




More information about the llvm-commits mailing list