r272361 - Reduce sizeof(CXXConstructorDecl) by 4-8 bytes.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 19:01:28 PDT 2016


Author: rsmith
Date: Thu Jun  9 21:01:28 2016
New Revision: 272361

URL: http://llvm.org/viewvc/llvm-project?rev=272361&view=rev
Log:
Reduce sizeof(CXXConstructorDecl) by 4-8 bytes.

Modified:
    cfe/trunk/include/clang/AST/DeclCXX.h

Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=272361&r1=272360&r2=272361&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Thu Jun  9 21:01:28 2016
@@ -2165,17 +2165,18 @@ public:
 /// \endcode
 class CXXConstructorDecl : public CXXMethodDecl {
   void anchor() override;
-  /// \brief Whether this constructor declaration has the \c explicit keyword
-  /// specified.
-  bool IsExplicitSpecified : 1;
 
   /// \name Support for base and member initializers.
   /// \{
   /// \brief The arguments used to initialize the base or member.
   LazyCXXCtorInitializersPtr CtorInitializers;
-  unsigned NumCtorInitializers;
+  unsigned NumCtorInitializers : 31;
   /// \}
 
+  /// \brief Whether this constructor declaration has the \c explicit keyword
+  /// specified.
+  unsigned IsExplicitSpecified : 1;
+
   CXXConstructorDecl(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc,
                      const DeclarationNameInfo &NameInfo,
                      QualType T, TypeSourceInfo *TInfo,
@@ -2183,8 +2184,8 @@ class CXXConstructorDecl : public CXXMet
                      bool isImplicitlyDeclared, bool isConstexpr)
     : CXXMethodDecl(CXXConstructor, C, RD, StartLoc, NameInfo, T, TInfo,
                     SC_None, isInline, isConstexpr, SourceLocation()),
-      IsExplicitSpecified(isExplicitSpecified), CtorInitializers(nullptr),
-      NumCtorInitializers(0) {
+      CtorInitializers(nullptr), NumCtorInitializers(0),
+      IsExplicitSpecified(isExplicitSpecified) {
     setImplicit(isImplicitlyDeclared);
   }
 




More information about the cfe-commits mailing list