[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. llvm-svn: 287081
Showing
- llvm/include/llvm/Object/ELF.h 125 additions, 122 deletionsllvm/include/llvm/Object/ELF.h
- llvm/include/llvm/Object/ELFObjectFile.h 78 additions, 38 deletionsllvm/include/llvm/Object/ELFObjectFile.h
- llvm/test/Object/corrupt.test 4 additions, 4 deletionsllvm/test/Object/corrupt.test
- llvm/test/Object/invalid.test 9 additions, 9 deletionsllvm/test/Object/invalid.test
- llvm/tools/llvm-objdump/ELFDump.cpp 3 additions, 2 deletionsllvm/tools/llvm-objdump/ELFDump.cpp
- llvm/tools/llvm-objdump/llvm-objdump.cpp 15 additions, 15 deletionsllvm/tools/llvm-objdump/llvm-objdump.cpp
- llvm/tools/llvm-readobj/ARMEHABIPrinter.h 13 additions, 12 deletionsllvm/tools/llvm-readobj/ARMEHABIPrinter.h
- llvm/tools/obj2yaml/elf2yaml.cpp 71 additions, 71 deletionsllvm/tools/obj2yaml/elf2yaml.cpp
Loading
Please register or sign in to comment