HomePhabricator

[Object] Fix the return type of getOffset/getSize

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

Details

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