From 9fd9fdd45a30d3be9210952f6bda82e420347507 Mon Sep 17 00:00:00 2001 From: Warren Hunt Date: Sat, 22 Feb 2014 00:22:15 +0000 Subject: [PATCH] Fix two warnings introduced r201907 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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 7e2944758d..18bea80e55 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -204,11 +204,11 @@ private: } // namespace { CGRecordLowering::CGRecordLowering(CodeGenTypes &Types, const RecordDecl *D) - : D(D), RD(dyn_cast(D)), + : Types(Types), Context(Types.getContext()), D(D), + RD(dyn_cast(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); -- 2.40.0