diff options
author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2019-10-15 20:10:34 +0000 |
---|---|---|
committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2019-10-15 20:10:34 +0000 |
commit | 4f2f9c00b978e45a0bb4c229912359e84ad6af11 (patch) | |
tree | 5225918013d4100f208499156d7e2d10fc337c33 | |
parent | 527e9f9a3f939b2fdb296da9e0e7bbe79b8f4a44 (diff) | |
download | bcm5719-llvm-4f2f9c00b978e45a0bb4c229912359e84ad6af11.tar.gz bcm5719-llvm-4f2f9c00b978e45a0bb4c229912359e84ad6af11.zip |
[llvm-lipo] Add missing cast
Add missing cast (to correctly sum 32-bit integers).
Test plan: make check-all
llvm-svn: 374945
-rw-r--r-- | llvm/tools/llvm-lipo/llvm-lipo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-lipo/llvm-lipo.cpp b/llvm/tools/llvm-lipo/llvm-lipo.cpp index ba413b10fb0..a063fcec757 100644 --- a/llvm/tools/llvm-lipo/llvm-lipo.cpp +++ b/llvm/tools/llvm-lipo/llvm-lipo.cpp @@ -688,7 +688,8 @@ static void createUniversalBinary(SmallVectorImpl<Slice> &Slices, return sys::fs::can_execute(S.getBinary()->getFileName()); }); const uint64_t OutputFileSize = - FatArchList.back().offset + FatArchList.back().size; + static_cast<uint64_t>(FatArchList.back().offset) + + FatArchList.back().size; Expected<std::unique_ptr<FileOutputBuffer>> OutFileOrError = FileOutputBuffer::create(OutputFileName, OutputFileSize, IsExecutable ? FileOutputBuffer::F_executable |