On Tue, Feb 8, 2011 at 8:59 PM, Ken Dyck <[email protected]> wrote: > Modified: cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=125156&r1=125155&r2=125156&view=diff > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp Tue Feb 8 19:59:34 2011 > @@ -489,8 +490,8 @@ > } > > // Append tail padding. > - if (Layout.getSize() / 8 > Size) > - AppendPadding(Layout.getSize() / 8, Align); > + if (Layout.getSize().getQuantity() > Size) > + AppendPadding(Layout.getSize().getQuantity(), Align); > } > > void CGRecordLayoutBuilder::LayoutBase(const CXXRecordDecl *BaseDecl, > @@ -624,7 +625,7 @@ > > > // First check if we can use the same fields as for the complete class. > - if (AlignedNonVirtualTypeSize == Layout.getSize() / 8) { > + if (AlignedNonVirtualTypeSize == Layout.getSize().getQuantity()) { > NonVirtualBaseTypeIsSameAsCompleteType = true; > return true; > } > @@ -686,7 +687,8 @@ > } > > // Append tail padding if necessary. > - AppendTailPadding(Layout.getSize()); > + AppendTailPadding( > + Layout.getSize().getQuantity() * Types.getContext().getCharWidth()); > > return true; > }
These two changes introduced compile warnings because they involved comparisons between integer types of different signedness. This has now been corrected in r125280. -Ken _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
