]> granicus.if.org Git - clang/commitdiff
Fix two warnings introduced r201907
authorWarren Hunt <whunt@google.com>
Sat, 22 Feb 2014 00:22:15 +0000 (00:22 +0000)
committerWarren Hunt <whunt@google.com>
Sat, 22 Feb 2014 00:22:15 +0000 (00:22 +0000)
Unused variable is removed.  Construction order is changed to match
declaration order.

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

lib/CodeGen/CGRecordLayoutBuilder.cpp

index 7e2944758d7a3af85a4e3ba2f2c2972fc96559c0..18bea80e55bc12394899979ef76cbf8042d3681a 100644 (file)
@@ -204,11 +204,11 @@ private:
 } // namespace {
 
 CGRecordLowering::CGRecordLowering(CodeGenTypes &Types, const RecordDecl *D)
-  : D(D), RD(dyn_cast<CXXRecordDecl>(D)),
+  : Types(Types), Context(Types.getContext()), D(D),
+    RD(dyn_cast<CXXRecordDecl>(D)),
     Layout(Types.getContext().getASTRecordLayout(D)),
-    IsZeroInitializable(true), IsZeroInitializableAsBase(true),
-    Packed(false), Types(Types), Context(Types.getContext()),
-    DataLayout(Types.getDataLayout()) {}
+    DataLayout(Types.getDataLayout()), IsZeroInitializable(true),
+    IsZeroInitializableAsBase(true), Packed(false) {}
 
 void CGRecordLowering::setBitFieldInfo(
     const FieldDecl *FD, CharUnits StartOffset, llvm::Type *StorageType) {
@@ -680,7 +680,6 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D,
 
   if (BaseTy) {
     CharUnits NonVirtualSize  = Layout.getNonVirtualSize();
-    CharUnits NonVirtualAlign = Layout.getNonVirtualAlignment();
 
     uint64_t AlignedNonVirtualTypeSizeInBits = 
       getContext().toBits(NonVirtualSize);