Revision: 126245 Author: dpatel Date: 2007-04-17 13:29:12 -0700 (Tue, 17 Apr 2007)
Log Message: ----------- Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047943.html Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 16:28:45 UTC (rev 126244) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-17 20:29:12 UTC (rev 126245) @@ -1382,8 +1382,10 @@ Pad = ArrayType::get(Pad, PadBytes); Info.addElement(Pad, FirstUnallocatedByte, PadBytes); FirstUnallocatedByte = StartOffsetInBits/8; - // This field will use some of the bits from this PadBytes. - FieldSizeInBits = FieldSizeInBits - (PadBytes*8 - PadBits); + // This field will use some of the bits from this PadBytes, if + // starting offset is not at byte boundry. + if (StartOffsetFromByteBoundry != 0) + FieldSizeInBits = FieldSizeInBits - (8 - PadBits); } // Now, Field starts at FirstUnallocatedByte and everything is aligned. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits