diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2018-10-30 13:42:41 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2018-10-30 13:42:41 +0000 |
commit | 6660d64d8d63db7066a12dc0de615f642b8814e3 (patch) | |
tree | ee978645c6def8835494f20fd798be9fd747c057 /lib/Sema/SemaStmt.cpp | |
parent | dbebe6ee9c0b6e15541bf03b3bf08dd1fd107a88 (diff) | |
download | clang-6660d64d8d63db7066a12dc0de615f642b8814e3.tar.gz |
[AST] Only store the needed data in WhileStmt
Don't store the data for the condition variable if not needed.
This cuts the size of WhileStmt by up to a pointer.
The order of the children is kept the same.
Differential Revision: https://reviews.llvm.org/D53715
Reviewed By: rjmccall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 2018c874af..5aff9c5573 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1306,8 +1306,8 @@ StmtResult Sema::ActOnWhileStmt(SourceLocation WhileLoc, ConditionResult Cond, if (isa<NullStmt>(Body)) getCurCompoundScope().setHasEmptyLoopBodies(); - return new (Context) - WhileStmt(Context, CondVal.first, CondVal.second, Body, WhileLoc); + return WhileStmt::Create(Context, CondVal.first, CondVal.second, Body, + WhileLoc); } StmtResult |