[PATCH] D32244: [BitVector] Add << and >> operators

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 14:31:36 PDT 2017


zturner created this revision.

`BitVector` does not currently provide any operators for shifting left and right by a specified amount.  This patch adds them.

The logic here is surprisingly headache-inducing, but I believe I got it correct.


https://reviews.llvm.org/D32244

Files:
  llvm/include/llvm/ADT/BitVector.h
  llvm/include/llvm/ADT/SmallBitVector.h
  llvm/include/llvm/Support/MathExtras.h
  llvm/unittests/ADT/BitVectorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32244.95822.patch
Type: text/x-patch
Size: 12868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170419/7cb89c84/attachment-0001.bin>


More information about the llvm-commits mailing list