Previously, BitVector was using an array of unsigned long as an
internal buffer. That design choice was not desirable if we want to
allow exporting bitmaps or importing existing bitmaps, because the
internal buffer's contents are different on machines with different
endianness.
In PDB file processing, we create bitmaps and then write it to a file.
We also read a bitmap from disk and convert it to BitVector.
All these operations involve for-loop for each bit and data copying
because we cannot map existing bitmaps to BitVector.
This patch solves the problem. Now the internal buffer is represented
as a byte array. So, two BitVectors having the identical bits are now
represented in the same way both on the LE and BE machines. The
endianness problem is gone.
In this patch, we are still doing word-size operations instead of
byte-size operations where possible. Changing the internal format
shouldn't degrade the performance.
Since words are always little endian, why not make the type of Word be support::ulittle32_t