[lld] 156b94c - Fix "result of 32-bit shift implicitly converted to 64 bits" MSVC warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 03:25:19 PDT 2022


Author: Simon Pilgrim
Date: 2022-04-07T11:25:09+01:00
New Revision: 156b94c2d3c340825c9308a07f770c552e7f1ff4

URL: https://github.com/llvm/llvm-project/commit/156b94c2d3c340825c9308a07f770c552e7f1ff4
DIFF: https://github.com/llvm/llvm-project/commit/156b94c2d3c340825c9308a07f770c552e7f1ff4.diff

LOG: Fix "result of 32-bit shift implicitly converted to 64 bits" MSVC warning. NFC.

Added: 
    

Modified: 
    lld/MachO/SyntheticSections.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index a4de385e04f00..69207d77c5d4f 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -1430,7 +1430,7 @@ void DeduplicatedCStringSection::finalizeContents() {
       assert(it != stringOffsetMap.end());
       StringOffset &offsetInfo = it->second;
       if (offsetInfo.outSecOff == UINT64_MAX) {
-        offsetInfo.outSecOff = alignTo(size, 1 << offsetInfo.trailingZeros);
+        offsetInfo.outSecOff = alignTo(size, 1ULL << offsetInfo.trailingZeros);
         size = offsetInfo.outSecOff + s.size();
       }
       isec->pieces[i].outSecOff = offsetInfo.outSecOff;


        


More information about the llvm-commits mailing list