[PATCH] D86772: [llvm-readobj] - Remove Error.cpp,.h and drop dependencies in the code.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 03:41:56 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, sbc100, mgorny.
Herald added a project: LLVM.
grimar requested review of this revision.
Herald added a subscriber: aheejin.
We have Error.cpp/.h which contains some code for working with error codes.
In fact we use Error/Expected<> almost everywhere already and we can get rid
of these files.
Note: a few places in the code used readobj specific error codes,
e.g. `return readobj_error::unknown_symbol`. But these codes are never really used,
i.e. the code checks the fact of a success/error call only.
So I've changes them to `return inconvertibleErrorCode()` for now.
It seems that these places probably should be converted to use `Error`/`Expected<>`.
Rebased on top of D86771 <https://reviews.llvm.org/D86771>.
https://reviews.llvm.org/D86772
Files:
llvm/test/tools/llvm-readobj/archive.test
llvm/tools/llvm-readobj/ARMEHABIPrinter.h
llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
llvm/tools/llvm-readobj/CMakeLists.txt
llvm/tools/llvm-readobj/COFFDumper.cpp
llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/tools/llvm-readobj/Error.cpp
llvm/tools/llvm-readobj/Error.h
llvm/tools/llvm-readobj/MachODumper.cpp
llvm/tools/llvm-readobj/ObjDumper.cpp
llvm/tools/llvm-readobj/WasmDumper.cpp
llvm/tools/llvm-readobj/Win64EHDumper.cpp
llvm/tools/llvm-readobj/WindowsResourceDumper.cpp
llvm/tools/llvm-readobj/XCOFFDumper.cpp
llvm/tools/llvm-readobj/llvm-readobj.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86772.288577.patch
Type: text/x-patch
Size: 13512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200828/39c366a3/attachment.bin>
More information about the llvm-commits
mailing list