[llvm-branch-commits] [llvm-gcc-branch] r104559 - /llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp

Stuart Hastings stuart at apple.com
Mon May 24 14:02:28 PDT 2010


Author: stuart
Date: Mon May 24 16:02:28 2010
New Revision: 104559

URL: http://llvm.org/viewvc/llvm-project?rev=104559&view=rev
Log:
Fix and off-by-one bug in bitfield handling.  Radar 7980096. (Hartnellifactation of r104523.)

Modified:
    llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp?rev=104559&r1=104558&r2=104559&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Hartnell/gcc/llvm-convert.cpp Mon May 24 16:02:28 2010
@@ -7293,7 +7293,7 @@
     // adjust FieldPtr so that it is close enough to the bitfield that
     // *FieldPtr contains the first needed bit.  Be careful to make sure that
     // the pointer remains appropriately aligned.
-    if (BitStart > LLVMValueBitSize) {
+    if (BitStart >= LLVMValueBitSize) {
       // In this case, we know that the alignment of the field is less than
       // the size of the field.  To get the pointer close enough, add some
       // number of alignment units to the pointer.





More information about the llvm-branch-commits mailing list