From 7de9a5ce60d7bad9b4922dda78143c57ee1659c6 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 4 Oct 2019 11:24:35 +0000 Subject: [PATCH] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. llvm-svn: 373729 --- llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h | 2 +- llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h b/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h index 6d44745..b531127 100644 --- a/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h +++ b/llvm/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/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp index 57fbc69..7366f53 100644 --- a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp +++ b/llvm/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) -- 2.7.4