[llvm] r369366 - Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 03:25:57 PDT 2019


Author: rksimon
Date: Tue Aug 20 03:25:57 2019
New Revision: 369366

URL: http://llvm.org/viewvc/llvm-project?rev=369366&view=rev
Log:
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

Modified:
    llvm/trunk/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp

Modified: llvm/trunk/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp?rev=369366&r1=369365&r2=369366&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp (original)
+++ llvm/trunk/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp Tue Aug 20 03:25:57 2019
@@ -144,7 +144,8 @@ uint64_t MachOLayoutBuilder::layoutSegme
         if (Sec.isVirtualSection()) {
           Sec.Offset = 0;
         } else {
-          uint64_t PaddingSize = OffsetToAlignment(SegFileSize, 1 << Sec.Align);
+          uint64_t PaddingSize =
+              OffsetToAlignment(SegFileSize, 1ull << Sec.Align);
           Sec.Offset = SegOffset + SegFileSize + PaddingSize;
           Sec.Size = Sec.Content.size();
           SegFileSize += PaddingSize + Sec.Size;




More information about the llvm-commits mailing list