[PATCH] D68966: [llvm-lipo] Add missing cast
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 18:14:03 PDT 2019
alexshap created this revision.
alexshap added reviewers: compnerd, smeenai.
Herald added a project: LLVM.
Add missing cast (to correctly sum 32-bit integers).
Repository:
rL LLVM
https://reviews.llvm.org/D68966
Files:
llvm-lipo.cpp
Index: llvm-lipo.cpp
===================================================================
--- llvm-lipo.cpp
+++ llvm-lipo.cpp
@@ -688,7 +688,8 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68966.224943.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/985a7e67/attachment.bin>
More information about the llvm-commits
mailing list