diff options
| author | Akira Hatanaka <ahatanaka@apple.com> | 2020-06-03 16:41:50 -0700 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@apple.com> | 2020-06-11 16:06:22 -0700 |
| commit | c9a52de0026093327daedda7ea2eead8b64657b4 (patch) | |
| tree | c6d60c7b6bab1e013a4a84fe59510b3e1f7ea2af /clang/lib/CodeGen/CGExprScalar.cpp | |
| parent | 8d8ec55035bda2cff5ef446cfacec93c67665c52 (diff) | |
[CodeGen] Simplify the way lifetime of block captures is extended
Rather than pushing inactive cleanups for the block captures at the
entry of a full expression and activating them during the creation of
the block literal, just call pushLifetimeExtendedDestroy to ensure the
cleanups are popped at the end of the scope enclosing the block
expression.
rdar://problem/63996471
Differential Revision: https://reviews.llvm.org/D81624
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 83614b031543..6b33d807a7bd 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2342,7 +2342,6 @@ Value *ScalarExprEmitter::VisitStmtExpr(const StmtExpr *E) { } Value *ScalarExprEmitter::VisitExprWithCleanups(ExprWithCleanups *E) { - CGF.enterFullExpression(E); CodeGenFunction::RunCleanupsScope Scope(CGF); Value *V = Visit(E->getSubExpr()); // Defend against dominance problems caused by jumps out of expression |
