[PATCH] D11890: Fixed Visual Studio warnings.
Yaron Keren via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 12:40:48 PDT 2015
yaron.keren added inline comments.
================
Comment at: include/llvm/ADT/SmallBitVector.h:558
@@ +557,3 @@
+ if (NumBaseBits == 64 && MaskWords >= 2)
+ M |= uintptr_t(Mask[1]) << 32;
+ if (InvertMask) M = ~M;
----------------
jtouton wrote:
> jtouton wrote:
> > yaron.keren wrote:
> > > What happens when MaskWords is 2 and we're running on a system where uintptr_t is 32 bits?
> > The upper word is ignored (just like before this change).
> (Note that NumBaseBits is defined based on sizeof(uintptr_t), line 39 above. It's a host value, not a target value.)
Silently ignore isn't good (problem with the original code, not your patch). At least
assert((NumBaseBits == 64 || MaskWords == 1) && "Mask is larger than base!");
otherwise, LGTM.
http://reviews.llvm.org/D11890
More information about the llvm-commits
mailing list