mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
bcb0d035e4
in the size field in the archive header for the member is not a number. To do this we have all of the needed methods return ErrorOr to push them up until we get out of lib. Then the tools and can handle the error in whatever way is appropriate for that tool. So the solution is to plumb all the ErrorOr stuff through everything that touches archives. This include its iterators as one can create an Archive object but the first or any other Child object may fail to be created due to a bad size field in its header. Thanks to Lang Hames on the changes making child_iterator contain an ErrorOr<Child> instead of a Child and the needed changes to ErrorOr.h to add operator overloading for * and -> . We don’t want to use llvm_unreachable() as it calls abort() and is produces a “crash” and using report_fatal_error() to move the error checking will cause the program to stop, neither of which are really correct in library code. There are still some uses of these that should be cleaned up in this library code for other than the size field. Also corrected the code where the size gets us to the “at the end of the archive” which is OK but past the end of the archive will return object_error::parse_failed now. The test cases use archives with text files so one can see the non-digit character, in this case a ‘%’, in the size field. llvm-svn: 250906 |
||
---|---|---|
.. | ||
ARMAttributeParser.cpp | ||
ARMAttributeParser.h | ||
ARMEHABIPrinter.h | ||
ARMWinEHPrinter.cpp | ||
ARMWinEHPrinter.h | ||
CMakeLists.txt | ||
COFFDumper.cpp | ||
COFFImportDumper.cpp | ||
ELFDumper.cpp | ||
Error.cpp | ||
Error.h | ||
llvm-readobj.cpp | ||
llvm-readobj.h | ||
LLVMBuild.txt | ||
MachODumper.cpp | ||
Makefile | ||
ObjDumper.cpp | ||
ObjDumper.h | ||
StackMapPrinter.h | ||
StreamWriter.cpp | ||
StreamWriter.h | ||
Win64EHDumper.cpp | ||
Win64EHDumper.h |