diff options
author | Kevin Enderby <enderby@apple.com> | 2014-06-18 22:04:40 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2014-06-18 22:04:40 +0000 |
commit | 4b8fc281d44beabc41d684a5604b934e864852fc (patch) | |
tree | 8da907bf52dd461720bbab54dd2d6c05ddc06958 /llvm/lib/Object/MachOUniversal.cpp | |
parent | 692bd5ec2f9f61d21b649a091e7186b081a073d4 (diff) | |
download | bcm5719-llvm-4b8fc281d44beabc41d684a5604b934e864852fc.tar.gz bcm5719-llvm-4b8fc281d44beabc41d684a5604b934e864852fc.zip |
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.
llvm-svn: 211230
Diffstat (limited to 'llvm/lib/Object/MachOUniversal.cpp')
-rw-r--r-- | llvm/lib/Object/MachOUniversal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOUniversal.cpp b/llvm/lib/Object/MachOUniversal.cpp index e414de8bcf1..05729ef7467 100644 --- a/llvm/lib/Object/MachOUniversal.cpp +++ b/llvm/lib/Object/MachOUniversal.cpp @@ -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. |