[PATCH] D23384: Use a byte array as an internal buffer of BitVector.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 17:32:00 PDT 2016


zturner added inline comments.

================
Comment at: include/llvm/ADT/BitVector.h:45
@@ +44,3 @@
+  // Words are in the little endian order on all platforms.
+  MutableArrayRef<Word> Words;
+
----------------
Since words are always little endian, why not make the type of Word be `support::ulittle32_t`

================
Comment at: include/llvm/ADT/BitVector.h:486
@@ -531,1 +485,3 @@
+      Word, support::little, false>;
+    return *(WordLE *)&W;
   }
----------------
ruiu wrote:
> I think it is, but we are doing this at so many places to read and convert values in different endianness.
If the type of Word is `support::ulittle32_t`, then you don't have to worry about this, as you can just delete this entire function.


https://reviews.llvm.org/D23384





More information about the llvm-commits mailing list