1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/Object
Kevin Enderby ff9abf809b Next step along the way to getting good error messages for bad archives.
I consulted with Lang Hames on this work, and the goal was to add a bit
of "where" in the archive the error occurred along with what the error was.

So this step changes ArchiveMemberHeader into a class with a pointer
to the archive header and the parent archive.  Which allows the methods
in the ArchiveMemberHeader to determine which member the header is
for to include that information in the error message.

For this first step the "where" is just the offset to the member in the
archive.  The next step will be a new method on ArchiveMemberHeader
to get the full name, if possible, to be use in the error message.  Which
will now be possible as ArchiveMemberHeader contains a pointer to
the Archive with its string table and its size, etc. so the full name can
be determined from the header if it is valid.

Also this change adds the missing checks the archive header is actually
contained in the buffer and is not truncated, as well as if the terminating
characters are correct in the header.

And changes one error message in Archive::Child::getNext() where the
name or offset to member is now added.

llvm-svn: 276686
2016-07-25 20:36:36 +00:00
..
Archive.h Next step along the way to getting good error messages for bad archives. 2016-07-25 20:36:36 +00:00
ArchiveWriter.h Add move constructor and move assignment to fix MSVC build. 2016-06-29 23:54:10 +00:00
Binary.h Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
COFF.h [Object, COFF] An import data directory might not consist soley of imports 2016-06-26 04:36:32 +00:00
COFFImportFile.h Object: Fix COFF import file's symbols. 2015-09-01 06:01:53 +00:00
ELF.h Use ArrayRef for contiguous areas in ELF. NFC. 2016-04-05 14:47:22 +00:00
ELFObjectFile.h BPF: Use official ELF e_machine value 2016-07-15 22:27:55 +00:00
ELFTypes.h Add a reference for Elf_Chdr type. 2016-07-07 20:19:19 +00:00
Error.h [Object] Move isNotObjectErrorInvalidFileType out of header. 2016-05-17 21:38:53 +00:00
IRObjectFile.h function_refify. NFC. 2016-07-01 11:05:15 +00:00
MachO.h Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
MachOUniversal.h Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
ModuleSummaryIndexObjectFile.h Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. 2016-06-17 20:41:14 +00:00
ObjectFile.h Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
RelocVisitor.h AMDGPU/SI: Add support for R_AMDGPU_ABS32 2016-07-21 15:29:19 +00:00
StackMapParser.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
SymbolicFile.h Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
SymbolSize.h Make computeSymbolSizes never fail. 2015-06-24 19:57:32 +00:00