Skip to content

Commit 146240e

Browse files
committed
Fix MSVC " 32-bit shift implicitly converted to 64 bits" warnings. NFC.
1 parent f539e00 commit 146240e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Instrumentation/TypeSanitizer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ bool TypeSanitizer::instrumentMemInst(Value *V, Instruction *ShadowBase,
854854

855855
if (!Src) {
856856
IRB.CreateMemSet(ShadowData, IRB.getInt8(0), IRB.CreateShl(Size, PtrShift),
857-
Align(1u << PtrShift));
857+
Align(1ull << PtrShift));
858858
return true;
859859
}
860860

@@ -866,11 +866,11 @@ bool TypeSanitizer::instrumentMemInst(Value *V, Instruction *ShadowBase,
866866
Value *SrcShadowData = IRB.CreateIntToPtr(SrcShadowDataInt, IRB.getPtrTy());
867867

868868
if (NeedsMemMove) {
869-
IRB.CreateMemMove(ShadowData, Align(1u << PtrShift), SrcShadowData,
870-
Align(1u << PtrShift), IRB.CreateShl(Size, PtrShift));
869+
IRB.CreateMemMove(ShadowData, Align(1ull << PtrShift), SrcShadowData,
870+
Align(1ull << PtrShift), IRB.CreateShl(Size, PtrShift));
871871
} else {
872-
IRB.CreateMemCpy(ShadowData, Align(1u << PtrShift), SrcShadowData,
873-
Align(1u << PtrShift), IRB.CreateShl(Size, PtrShift));
872+
IRB.CreateMemCpy(ShadowData, Align(1ull << PtrShift), SrcShadowData,
873+
Align(1ull << PtrShift), IRB.CreateShl(Size, PtrShift));
874874
}
875875

876876
return true;

0 commit comments

Comments
 (0)