summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaPseudoObject.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2019-01-26 14:15:10 +0000
committerBruno Ricci <riccibrun@gmail.com>2019-01-26 14:15:10 +0000
commitdb07683d866bdd0c1d2b651066081b64f9563333 (patch)
treec517e7da654ba9c1951395b5a8415229f4daff58 /clang/lib/Sema/SemaPseudoObject.cpp
parent94498c70ae44d51835f4a7110877ed77c48251b2 (diff)
downloadbcm5719-llvm-db07683d866bdd0c1d2b651066081b64f9563333.tar.gz
bcm5719-llvm-db07683d866bdd0c1d2b651066081b64f9563333.zip
[AST] Pack GenericSelectionExpr
Store the controlling expression, the association expressions and the corresponding TypeSourceInfos as trailing objects. Additionally use the bit-fields of Stmt to store one SourceLocation, saving one additional pointer. This saves 3 pointers in total per GenericSelectionExpr. Differential Revision: https://reviews.llvm.org/D57104 Reviewed By: aaron.ballman Reviewers: aaron.ballman, steveire llvm-svn: 352276
Diffstat (limited to 'clang/lib/Sema/SemaPseudoObject.cpp')
-rw-r--r--clang/lib/Sema/SemaPseudoObject.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp
index 1e2ba97edcc..37dd7b1e8d2 100644
--- a/clang/lib/Sema/SemaPseudoObject.cpp
+++ b/clang/lib/Sema/SemaPseudoObject.cpp
@@ -150,15 +150,10 @@ namespace {
assocTypes[i] = gse->getAssocTypeSourceInfo(i);
}
- return new (S.Context) GenericSelectionExpr(S.Context,
- gse->getGenericLoc(),
- gse->getControllingExpr(),
- assocTypes,
- assocs,
- gse->getDefaultLoc(),
- gse->getRParenLoc(),
- gse->containsUnexpandedParameterPack(),
- resultIndex);
+ return GenericSelectionExpr::Create(
+ S.Context, gse->getGenericLoc(), gse->getControllingExpr(),
+ assocTypes, assocs, gse->getDefaultLoc(), gse->getRParenLoc(),
+ gse->containsUnexpandedParameterPack(), resultIndex);
}
if (ChooseExpr *ce = dyn_cast<ChooseExpr>(e)) {
OpenPOWER on IntegriCloud