Re-arrange and bitfieldify data members of CXXConstructExpr to save a

little storage.

llvm-svn: 140529
This commit is contained in:
Douglas Gregor 2011-09-26 14:47:03 +00:00
parent 882a61a640
commit 488c231183
2 changed files with 8 additions and 8 deletions

View File

@ -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,

View File

@ -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];