[PATCH] D53714: [AST] Only store the needed data in SwitchStmt.
Bruno Ricci via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 25 10:04:04 PDT 2018
riccibruno created this revision.
riccibruno added a reviewer: rjmccall.
riccibruno added a project: clang.
Herald added a subscriber: cfe-commits.
Don't store the data for the init statement and condition variable
if not needed. This cuts the size of `SwitchStmt` by up to 2 pointers.
The order of the children is kept the same.
Also use the newly available space in the bit-fields of `Stmt`
to store the bit representing whether all enum have been covered
instead of using a `PointerIntPair`.
Repository:
rC Clang
https://reviews.llvm.org/D53714
Files:
include/clang/AST/Stmt.h
lib/AST/ASTImporter.cpp
lib/AST/Stmt.cpp
lib/Sema/SemaStmt.cpp
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
test/Import/switch-stmt/test.cpp
test/Misc/ast-dump-color.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53714.171126.patch
Type: text/x-patch
Size: 17945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181025/2e259019/attachment.bin>
More information about the cfe-commits
mailing list