OSDN Git Service

[ELF] Convert ELF.h to Expected<T>.
authorDavide Italiano <davide@freebsd.org>
Wed, 16 Nov 2016 05:10:28 +0000 (05:10 +0000)
committerDavide Italiano <davide@freebsd.org>
Wed, 16 Nov 2016 05:10:28 +0000 (05:10 +0000)
commit63830bcae99c09c3d983368568adc80c9c211455
treee436c95eb5e123c18e9b89b3d486569a967ca8ec
parent68e337a67b4063f6a02d981f55dd3613fe9957b1
[ELF] Convert ELF.h to Expected<T>.

This has two advantages:
1) We slowly move away from ErrorOr to the new handling interface,
in the hope of having an uniform error handling in LLVM, eventually.
2) We're starting to have *meaningful* error messages for invalid
object ELF files, rather than a generic "parse error". At some point
we should include also the offset to improve the quality of the
diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287081 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
include/llvm/Object/ELFObjectFile.h
test/Object/corrupt.test
test/Object/invalid.test
tools/llvm-objdump/ELFDump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/ARMEHABIPrinter.h
tools/obj2yaml/elf2yaml.cpp