From 54a7baee20e2943da5f9ff4020c45924891815a9 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Tue, 15 Oct 2019 20:10:34 +0000 Subject: [PATCH] [llvm-lipo] Add missing cast Add missing cast (to correctly sum 32-bit integers). Test plan: make check-all git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374945 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-lipo/llvm-lipo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/llvm-lipo/llvm-lipo.cpp b/tools/llvm-lipo/llvm-lipo.cpp index ba413b10fb0..a063fcec757 100644 --- a/tools/llvm-lipo/llvm-lipo.cpp +++ b/tools/llvm-lipo/llvm-lipo.cpp @@ -688,7 +688,8 @@ static void createUniversalBinary(SmallVectorImpl &Slices, return sys::fs::can_execute(S.getBinary()->getFileName()); }); const uint64_t OutputFileSize = - FatArchList.back().offset + FatArchList.back().size; + static_cast(FatArchList.back().offset) + + FatArchList.back().size; Expected> OutFileOrError = FileOutputBuffer::create(OutputFileName, OutputFileSize, IsExecutable ? FileOutputBuffer::F_executable -- 2.40.0