]> granicus.if.org Git - clang/commitdiff
Eliminate some signed-to-unsigned comparision warnings introduced in
authorKen Dyck <kd@kendyck.com>
Thu, 10 Feb 2011 12:20:05 +0000 (12:20 +0000)
committerKen Dyck <kd@kendyck.com>
Thu, 10 Feb 2011 12:20:05 +0000 (12:20 +0000)
r125156.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125280 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRecordLayoutBuilder.cpp

index e16173b6dcaf26dcf7152b2f39d4a6b14576fe65..36673764b9f14bb04a0df2e27c07977734b50736 100644 (file)
@@ -490,7 +490,8 @@ void CGRecordLayoutBuilder::LayoutUnion(const RecordDecl *D) {
   }
 
   // Append tail padding.
-  if (Layout.getSize().getQuantity() > Size)
+  uint64_t RecordSizeInBits = Layout.getSize().getQuantity();
+  if (RecordSizeInBits > Size)
     AppendPadding(Layout.getSize().getQuantity(), Align);
 }
 
@@ -625,7 +626,8 @@ CGRecordLayoutBuilder::ComputeNonVirtualBaseType(const CXXRecordDecl *RD) {
   
   
   // First check if we can use the same fields as for the complete class.
-  if (AlignedNonVirtualTypeSize == Layout.getSize().getQuantity()) {
+  uint64_t RecordSizeInBits = Layout.getSize().getQuantity();
+  if (AlignedNonVirtualTypeSize == RecordSizeInBits) {
     NonVirtualBaseTypeIsSameAsCompleteType = true;
     return true;
   }