[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:57:14 PDT 2016


zturner added inline comments.

================
Comment at: include/llvm/ADT/BitVector.h:478
@@ +477,3 @@
+  Word fromLE(Word W) const {
+#ifdef __BIG_ENDIAN__
+    return sys::getSwappedBytes(W);
----------------
I don't think it's a good idea to check system endianness.  This would be the only place in the entire codebase we checked it aside from something in libfuzzer.  What about the alternative that bryant proposed earlier?  


https://reviews.llvm.org/D23384





More information about the llvm-commits mailing list