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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 17:51:46 PDT 2017


chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.

Generally this looks pretty awesome. Thanks for all of this. Minor nitpicks inline. I'd let Craig have a look as well just in case I'm not seeing anything, but good to submit if he's happy as well.



================
Comment at: llvm/include/llvm/ADT/BitVector.h:499
+
+    for (unsigned I = 0; I < NumWords - 1; ++I) {
+      Bits[I] >>= BitDistance;
----------------
Nit picky detail: I would use 'i' for an integer and 'I' for an iterator.


================
Comment at: llvm/include/llvm/ADT/BitVector.h:556
+    Bits[0] <<= BitDistance;
+    clear_unused_bits();
+
----------------
Why is this needed here again? We have to have put zeros into the low bits here as well...


https://reviews.llvm.org/D32244





More information about the llvm-commits mailing list