forked from OSchip/llvm-project
95b0842e64
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 |
||
---|---|---|
.. | ||
Archive.cpp | ||
ArchiveWriter.cpp | ||
Binary.cpp | ||
CMakeLists.txt | ||
COFFObjectFile.cpp | ||
ELF.cpp | ||
ELFObjectFile.cpp | ||
Error.cpp | ||
IRObjectFile.cpp | ||
LLVMBuild.txt | ||
MachOObjectFile.cpp | ||
MachOUniversal.cpp | ||
ModuleSummaryIndexObjectFile.cpp | ||
Object.cpp | ||
ObjectFile.cpp | ||
RecordStreamer.cpp | ||
RecordStreamer.h | ||
SymbolSize.cpp | ||
SymbolicFile.cpp |