hanchenye-llvm-project/llvm/tools/llvm-objdump
Kevin Enderby ac9e15551d Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error
when the object is in an archive to use something like libx.a(foo.o) as part of
the error message.

Also changed llvm-objdump and llvm-size to be like llvm-nm and ignore non-object
files in archives and not produce any error message.

To do this Archive::Child::getAsBinary() was changed from ErrorOr<...> to
Expected<...> then that was threaded up to its users.

Converting this interface to Expected<> from ErrorOr<> does involve
touching a number of places. To contain the changes for now the use of
errorToErrorCode() is still used in one place yet to be fully converted.

Again there some were bugs in the existing code that did not deal with the
old ErrorOr<> return values.  So now with Expected<> since they must be
checked and the error handled, I added a TODO and a comments for those.

llvm-svn: 269784
2016-05-17 17:10:12 +00:00
..
CMakeLists.txt Stop linking all target libraries in llvm-nm and llvm-objdump. 2015-10-07 22:39:17 +00:00
COFFDump.cpp Thread Expected<...> up from libObject’s getType() for symbols to allow llvm-objdump to produce a good error message. 2016-05-02 20:28:12 +00:00
ELFDump.cpp Simplify iterating over program headers and detect corrupt ones. 2015-07-20 13:35:33 +00:00
LLVMBuild.txt
MachODump.cpp Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
llvm-objdump.cpp Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00
llvm-objdump.h Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error 2016-05-17 17:10:12 +00:00