From: Simon Pilgrim Date: Fri, 4 Oct 2019 11:24:35 +0000 (+0000) Subject: Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d4540cfac6e4f77f334dd900205ef993df0eb5f;p=llvm Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373729 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ExecutionEngine/JITLink/JITLink.h b/include/llvm/ExecutionEngine/JITLink/JITLink.h index 6d44745869e..b531127cf89 100644 --- a/include/llvm/ExecutionEngine/JITLink/JITLink.h +++ b/include/llvm/ExecutionEngine/JITLink/JITLink.h @@ -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; } diff --git a/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp b/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp index 57fbc699757..7366f53ebf3 100644 --- a/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp +++ b/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp @@ -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)