[llvm] r373729 - 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
Fri Oct 4 04:24:35 PDT 2019
Author: rksimon
Date: Fri Oct 4 04:24:35 2019
New Revision: 373729
URL: http://llvm.org/viewvc/llvm-project?rev=373729&view=rev
Log:
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/trunk/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h?rev=373729&r1=373728&r2=373729&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/JITLink/JITLink.h Fri Oct 4 04:24:35 2019
@@ -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; }
Modified: llvm/trunk/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp?rev=373729&r1=373728&r2=373729&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp Fri Oct 4 04:24:35 2019
@@ -312,7 +312,7 @@ Error MachOLinkGraphBuilder::graphifyReg
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)
More information about the llvm-commits
mailing list