ELF: Change check(Expected<T>, const Twine &) to call toString instead of converting to an error code.

llvm-svn: 298155
This commit is contained in:
Peter Collingbourne 2017-03-17 22:06:36 +00:00
parent 4b78036ba8
commit 5758b2e488
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ template <class T> T check(ErrorOr<T> E, const Twine &Prefix) {
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);
}

View File

@ -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