[lld] r298155 - ELF: Change check(Expected<T>, const Twine &) to call toString instead of converting to an error code.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 15:06:37 PDT 2017
Author: pcc
Date: Fri Mar 17 17:06:36 2017
New Revision: 298155
URL: http://llvm.org/viewvc/llvm-project?rev=298155&view=rev
Log:
ELF: Change check(Expected<T>, const Twine &) to call toString instead of converting to an error code.
Modified:
lld/trunk/ELF/Error.h
lld/trunk/test/ELF/invalid/dynamic-section-size.s
Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=298155&r1=298154&r2=298155&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Fri Mar 17 17:06:36 2017
@@ -69,7 +69,7 @@ template <class T> T check(ErrorOr<T> E,
template <class T> T check(Expected<T> E, const Twine &Prefix) {
if (!E)
- fatal(Prefix + ": " + errorToErrorCode(E.takeError()).message());
+ fatal(Prefix + ": " + toString(E.takeError()));
return std::move(*E);
}
Modified: lld/trunk/test/ELF/invalid/dynamic-section-size.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/dynamic-section-size.s?rev=298155&r1=298154&r2=298155&view=diff
==============================================================================
--- lld/trunk/test/ELF/invalid/dynamic-section-size.s (original)
+++ lld/trunk/test/ELF/invalid/dynamic-section-size.s Fri Mar 17 17:06:36 2017
@@ -1,4 +1,4 @@
## dynamic-section-sh_size.elf has incorrect sh_size of dynamic section.
# RUN: not ld.lld %p/Inputs/dynamic-section-sh_size.elf -o %t2 2>&1 | \
# RUN: FileCheck %s
-# CHECK: getSectionContentsAsArray failed: Invalid data was encountered while parsing the file
+# CHECK: getSectionContentsAsArray failed: invalid sh_entsize
More information about the llvm-commits
mailing list