diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-26 14:47:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-26 14:47:03 +0000 |
commit | a48e676a717309afa50ae06a3d4674acec025bf9 (patch) | |
tree | 29ca8a97dbe53cb86df9a54095f49fdcefd182d3 | |
parent | 480b53cfff18c40d10fcb09b0185a9b75dfd491e (diff) |
Re-arrange and bitfieldify data members of CXXConstructExpr to save a
little storage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140529 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/ExprCXX.h | 10 | ||||
-rw-r--r-- | lib/AST/ExprCXX.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index da479b1e31..d42d12e4b5 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -807,11 +807,11 @@ private: SourceLocation Loc; SourceRange ParenRange; + unsigned NumArgs : 16; bool Elidable : 1; bool ZeroInitialization : 1; unsigned ConstructKind : 2; Stmt **Args; - unsigned NumArgs; protected: CXXConstructExpr(ASTContext &C, StmtClass SC, QualType T, @@ -824,15 +824,15 @@ protected: /// \brief Construct an empty C++ construction expression. CXXConstructExpr(StmtClass SC, EmptyShell Empty) - : Expr(SC, Empty), Constructor(0), Elidable(0), ZeroInitialization(0), - ConstructKind(0), Args(0), NumArgs(0) { } + : Expr(SC, Empty), Constructor(0), NumArgs(0), Elidable(0), + ZeroInitialization(0), ConstructKind(0), Args(0) { } public: /// \brief Construct an empty C++ construction expression. explicit CXXConstructExpr(EmptyShell Empty) : Expr(CXXConstructExprClass, Empty), Constructor(0), - Elidable(0), ZeroInitialization(0), - ConstructKind(0), Args(0), NumArgs(0) { } + NumArgs(0), Elidable(0), ZeroInitialization(0), + ConstructKind(0), Args(0) { } static CXXConstructExpr *Create(ASTContext &C, QualType T, SourceLocation Loc, diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 1cad13a6cb..95b03ee183 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -665,9 +665,9 @@ CXXConstructExpr::CXXConstructExpr(ASTContext &C, StmtClass SC, QualType T, T->isDependentType(), T->isDependentType(), T->isInstantiationDependentType(), T->containsUnexpandedParameterPack()), - Constructor(D), Loc(Loc), ParenRange(ParenRange), Elidable(elidable), - ZeroInitialization(ZeroInitialization), ConstructKind(ConstructKind), - Args(0), NumArgs(numargs) + Constructor(D), Loc(Loc), ParenRange(ParenRange), NumArgs(numargs), + Elidable(elidable), ZeroInitialization(ZeroInitialization), + ConstructKind(ConstructKind), Args(0) { if (NumArgs) { Args = new (C) Stmt*[NumArgs]; |