HomePhabricator

[Object] Fix the return type of getOffset/getSize

Authored by alexshap on Thu, Oct 17, 11:48 AM.

Description

[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

Details

Committed
alexshapThu, Oct 17, 11:48 AM
Differential Revision
D69126: [Object] Fix the return type of getOffset/getSize
Parents
rG31a691e2a229: [NFC][InstCombine] Some more preparatory cleanup for…
Branches
Unknown
Tags
Unknown