From: Richard Smith Date: Fri, 10 Jun 2016 02:01:28 +0000 (+0000) Subject: Reduce sizeof(CXXConstructorDecl) by 4-8 bytes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8085b7c130683f01bf8901997d93f24eede69b20;p=clang Reduce sizeof(CXXConstructorDecl) by 4-8 bytes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272361 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index a5cf9ca992..755542c04a 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -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 CXXMethodDecl { 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); }