[llvm-commits] [llvm] r92731 - /llvm/trunk/include/llvm/ADT/SmallBitVector.h

Dan Gohman gohman at apple.com
Tue Jan 5 07:28:21 PST 2010


Author: djg
Date: Tue Jan  5 09:28:21 2010
New Revision: 92731

URL: http://llvm.org/viewvc/llvm-project?rev=92731&view=rev
Log:
Some versions of GCC don't like non-static data members in sizeof
in this context.

Modified:
    llvm/trunk/include/llvm/ADT/SmallBitVector.h

Modified: llvm/trunk/include/llvm/ADT/SmallBitVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallBitVector.h?rev=92731&r1=92730&r2=92731&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallBitVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallBitVector.h Tue Jan  5 09:28:21 2010
@@ -35,7 +35,7 @@
   PointerIntPair<BitVector *, 1, uintptr_t> X;
 
   // The number of bits in this class.
-  static const size_t NumBaseBits = sizeof(X) * CHAR_BIT;
+  static const size_t NumBaseBits = sizeof(uintptr_t) * CHAR_BIT;
 
   // One bit is used to discriminate between small and large mode. The
   // remaining bits are used for the small-mode representation.





More information about the llvm-commits mailing list