[Object] Fix handling of large archive members
authorJames Henderson <james.henderson@sony.com>
Fri, 6 Mar 2020 14:25:32 +0000 (14:25 +0000)
committerJames Henderson <james.henderson@sony.com>
Wed, 11 Mar 2020 10:29:45 +0000 (10:29 +0000)
commit326bc1da45b22110a11e0578022829a263ed4311
treeb3276c36d06804fc8257a0978c3a067c55a582ba
parenta6d3bec83fca0568e1fb02b9297b43435b9579d6
[Object] Fix handling of large archive members

The archive library truncated the size of archive members whose size was
greater than max uint32_t. This patch fixes the issue and adds some unit
tests to verify.

Reviewed by: ruiu, MaskRay, grimar, rupprecht

Differential Revision: https://reviews.llvm.org/D75742
llvm/lib/Object/Archive.cpp
llvm/unittests/Object/ArchiveTest.cpp [new file with mode: 0644]
llvm/unittests/Object/CMakeLists.txt