summaryrefslogtreecommitdiff
path: root/include/clang/AST/Stmt.h
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-12-22 14:39:30 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-12-22 14:39:30 +0000
commitc98f5f226b27512367700c50c6fb477d663e5c95 (patch)
tree5bd6ab093667d3103a1e6864763077083aa06138 /include/clang/AST/Stmt.h
parent71ba9f34f8103934f0aa68e04ba3f9b6bbca0a5f (diff)
downloadclang-c98f5f226b27512367700c50c6fb477d663e5c95.tar.gz
[AST] Store the arguments of CXXConstructExpr in a trailing array
Store the arguments of CXXConstructExpr in a trailing array. This is very similar to the CallExpr case in D55771, with the exception that there is only one derived class (CXXTemporaryObjectExpr) and that we compute the offset to the trailing array instead of storing it. This saves one pointer per CXXConstructExpr and CXXTemporaryObjectExpr. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D56022 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Stmt.h')
-rw-r--r--include/clang/AST/Stmt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index ff9be8dbb7..9d8a297487 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -655,6 +655,22 @@ protected:
unsigned NumArgs : 32 - 8 - 1 - NumExprBits;
};
+ class CXXConstructExprBitfields {
+ friend class ASTStmtReader;
+ friend class CXXConstructExpr;
+
+ unsigned : NumExprBits;
+
+ unsigned Elidable : 1;
+ unsigned HadMultipleCandidates : 1;
+ unsigned ListInitialization : 1;
+ unsigned StdInitListInitialization : 1;
+ unsigned ZeroInitialization : 1;
+ unsigned ConstructionKind : 3;
+
+ SourceLocation Loc;
+ };
+
class ExprWithCleanupsBitfields {
friend class ASTStmtReader; // deserialization
friend class ExprWithCleanups;
@@ -746,6 +762,7 @@ protected:
CXXDefaultInitExprBitfields CXXDefaultInitExprBits;
CXXDeleteExprBitfields CXXDeleteExprBits;
TypeTraitExprBitfields TypeTraitExprBits;
+ CXXConstructExprBitfields CXXConstructExprBits;
ExprWithCleanupsBitfields ExprWithCleanupsBits;
// C++ Coroutines TS expressions