mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Teach llvm-size to know about Mach-O universal files (aka fat files) and
fat files containing archives. Also fix a bug in MachOUniversalBinary::ObjectForArch::ObjectForArch() where it needed a >= when comparing the Index with the number of objects in a fat file. As the index starts at 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211230 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -53,7 +53,7 @@ static T getUniversalBinaryStruct(const char *Ptr) {
|
||||
MachOUniversalBinary::ObjectForArch::ObjectForArch(
|
||||
const MachOUniversalBinary *Parent, uint32_t Index)
|
||||
: Parent(Parent), Index(Index) {
|
||||
if (!Parent || Index > Parent->getNumberOfObjects()) {
|
||||
if (!Parent || Index >= Parent->getNumberOfObjects()) {
|
||||
clear();
|
||||
} else {
|
||||
// Parse object header.
|
||||
|
||||
Reference in New Issue
Block a user