[PATCH] D56874: [WebAssembly] Fix windows compiler warning by using explicit 64bit shift. NFC.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 14:13:21 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL351488: [WebAssembly] Fix windows compiler warning by using explicit 64bit shift. NFC. (authored by sbc, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56874/new/
https://reviews.llvm.org/D56874
Files:
lld/trunk/wasm/OutputSegment.h
lld/trunk/wasm/Writer.cpp
Index: lld/trunk/wasm/Writer.cpp
===================================================================
--- lld/trunk/wasm/Writer.cpp
+++ lld/trunk/wasm/Writer.cpp
@@ -733,7 +733,7 @@
MemAlign = 0;
for (OutputSegment *Seg : Segments) {
MemAlign = std::max(MemAlign, Seg->Alignment);
- MemoryPtr = alignTo(MemoryPtr, 1 << Seg->Alignment);
+ MemoryPtr = alignTo(MemoryPtr, 1ULL << Seg->Alignment);
Seg->StartVA = MemoryPtr;
log(formatv("mem: {0,-15} offset={1,-8} size={2,-8} align={3}", Seg->Name,
MemoryPtr, Seg->Size, Seg->Alignment));
Index: lld/trunk/wasm/OutputSegment.h
===================================================================
--- lld/trunk/wasm/OutputSegment.h
+++ lld/trunk/wasm/OutputSegment.h
@@ -26,7 +26,7 @@
void addInputSegment(InputSegment *InSeg) {
Alignment = std::max(Alignment, InSeg->getAlignment());
InputSegments.push_back(InSeg);
- Size = llvm::alignTo(Size, 1 << InSeg->getAlignment());
+ Size = llvm::alignTo(Size, 1ULL << InSeg->getAlignment());
InSeg->OutputSeg = this;
InSeg->OutputSegmentOffset = Size;
Size += InSeg->getSize();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56874.182398.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190117/83fc0a77/attachment.bin>
More information about the llvm-commits
mailing list