summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-26 14:47:03 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-26 14:47:03 +0000
commit488c231183ddbdec003d02c72983d6cca8450392 (patch)
tree39163bc9b5bd31a3956971c4a1ec946416e3113c
parent882a61a6403587700eb5db58af07414512845039 (diff)
downloadbcm5719-llvm-488c231183ddbdec003d02c72983d6cca8450392.tar.gz
bcm5719-llvm-488c231183ddbdec003d02c72983d6cca8450392.zip
Re-arrange and bitfieldify data members of CXXConstructExpr to save a
little storage. llvm-svn: 140529
-rw-r--r--clang/include/clang/AST/ExprCXX.h10
-rw-r--r--clang/lib/AST/ExprCXX.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/clang/include/clang/AST/ExprCXX.h b/clang/include/clang/AST/ExprCXX.h
index da479b1e311..d42d12e4b57 100644
--- a/clang/include/clang/AST/ExprCXX.h
+++ b/clang/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/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp
index 1cad13a6cb1..95b03ee1832 100644
--- a/clang/lib/AST/ExprCXX.cpp
+++ b/clang/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];
OpenPOWER on IntegriCloud