[PATCH] D56022: [AST] Store the arguments of CXXConstructExpr in a trailing array

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 21 13:15:57 PST 2018


riccibruno created this revision.
riccibruno added a reviewer: rjmccall.
riccibruno added a project: clang.
Herald added a reviewer: shafik.
Herald added a subscriber: cfe-commits.

Store the arguments of `CXXConstructExpr` in a trailing array. This is very similar to the
`CallExpr` case in D55771 <https://reviews.llvm.org/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`.

(with some comments inline)


Repository:
  rC Clang

https://reviews.llvm.org/D56022

Files:
  include/clang/AST/ExprCXX.h
  include/clang/AST/Stmt.h
  lib/AST/ASTImporter.cpp
  lib/AST/ExprCXX.cpp
  lib/Sema/SemaInit.cpp
  lib/Serialization/ASTReaderStmt.cpp
  lib/Serialization/ASTWriterStmt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56022.179337.patch
Type: text/x-patch
Size: 28947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181221/8e664b42/attachment-0001.bin>


More information about the cfe-commits mailing list