summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <shal1t712@gmail.com>2019-10-15 20:10:34 +0000
committerAlexander Shaposhnikov <shal1t712@gmail.com>2019-10-15 20:10:34 +0000
commit4f2f9c00b978e45a0bb4c229912359e84ad6af11 (patch)
tree5225918013d4100f208499156d7e2d10fc337c33
parent527e9f9a3f939b2fdb296da9e0e7bbe79b8f4a44 (diff)
downloadbcm5719-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.cpp3
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
OpenPOWER on IntegriCloud