]> granicus.if.org Git - llvm/commitdiff
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 4 Oct 2019 11:24:35 +0000 (11:24 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 4 Oct 2019 11:24:35 +0000 (11:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373729 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/JITLink/JITLink.h
lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp

index 6d44745869e16e4e71a24ee6d41f345b8abc7768..b531127cf892826adf136645321ef047b903eb50 100644 (file)
@@ -206,7 +206,7 @@ public:
   }
 
   /// Get the alignment for this content.
-  uint64_t getAlignment() const { return 1 << P2Align; }
+  uint64_t getAlignment() const { return 1ull << P2Align; }
 
   /// Get the alignment offset for this content.
   uint64_t getAlignmentOffset() const { return AlignmentOffset; }
index 57fbc69975754015043ed49367d8bc15e16af178..7366f53ebf36bf8c8acc8b9d3b2344c1d157f69b 100644 (file)
@@ -312,7 +312,7 @@ Error MachOLinkGraphBuilder::graphifyRegularSymbols() {
                                           Twine(KV.first));
         NSym.GraphSymbol = &G->addCommonSymbol(
             *NSym.Name, NSym.S, getCommonSection(), NSym.Value, 0,
-            1U << MachO::GET_COMM_ALIGN(NSym.Desc),
+            1ull << MachO::GET_COMM_ALIGN(NSym.Desc),
             NSym.Desc & MachO::N_NO_DEAD_STRIP);
       } else {
         if (!NSym.Name)