summaryrefslogtreecommitdiff
path: root/lib/Object
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2014-06-18 22:04:40 +0000
committerKevin Enderby <enderby@apple.com>2014-06-18 22:04:40 +0000
commitfb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c (patch)
tree870821c76b4ffa05d6db078eaac6d52aae75bd9c /lib/Object
parentce09bda96ee00a1024952faf85e3fa01e0d6bc72 (diff)
downloadllvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.gz
llvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.bz2
llvm-fb2b9fb894b6c9be8a290bdf69c29f0f5511ba3c.tar.xz
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
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/MachOUniversal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/MachOUniversal.cpp b/lib/Object/MachOUniversal.cpp
index e414de8bcf..05729ef746 100644
--- a/lib/Object/MachOUniversal.cpp
+++ b/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.