Skip to content

Commit 8c2cece

Browse files
authored
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC. (#161496)
1 parent da1eabd commit 8c2cece

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/CAS/OnDiskTrieRawHashMap.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class SubtrieHandle {
114114
using SlotT = std::atomic<int64_t>;
115115

116116
static int64_t getSlotsSize(uint32_t NumBits) {
117-
return sizeof(int64_t) * (1u << NumBits);
117+
return sizeof(int64_t) * (1ull << NumBits);
118118
}
119119

120120
static int64_t getSize(uint32_t NumBits) {
@@ -191,7 +191,8 @@ class SubtrieHandle {
191191
MutableArrayRef<SlotT> Slots;
192192

193193
static MutableArrayRef<SlotT> getSlots(Header &H) {
194-
return MutableArrayRef(reinterpret_cast<SlotT *>(&H + 1), 1u << H.NumBits);
194+
return MutableArrayRef(reinterpret_cast<SlotT *>(&H + 1),
195+
1ull << H.NumBits);
195196
}
196197
};
197198

0 commit comments

Comments
 (0)