[Object] Fix the return type of getOffset/getSize
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 17 Oct 2019 18:48:07 +0000 (18:48 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 17 Oct 2019 18:48:07 +0000 (18:48 +0000)
commit68db51d5c677239fe5ca286f068909479deb75c7
tree4c13ff47bfdeecdf6b317de92ecb7d7e38e2ce8e
parent31a691e2a2293a9ecb5330f081f2410bc1ff4474
[Object] Fix the return type of getOffset/getSize

Header64.offset/Header64.size are uint64_t, thus we should not
truncate them to unit32_t. Moreover, there are a number of places
where we sum the offset and the size (e.g. in various checks in MachOUniversal.cpp),
the truncation causes issues since the offset/size can perfectly fit into uint32_t,
while the sum overflows.

Differential revision: https://reviews.llvm.org/D69126

Test plan: make check-all

llvm-svn: 375154
llvm/include/llvm/Object/MachOUniversal.h