From c9a52de0026093327daedda7ea2eead8b64657b4 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 3 Jun 2020 16:41:50 -0700 Subject: [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 --- clang/lib/CodeGen/CGExpr.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExpr.cpp') diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index c7c1fbb89038..c8147ede93c9 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1330,7 +1330,6 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { case Expr::ExprWithCleanupsClass: { const auto *cleanups = cast(E); - enterFullExpression(cleanups); RunCleanupsScope Scope(*this); LValue LV = EmitLValue(cleanups->getSubExpr()); if (LV.isSimple()) { -- cgit v1.2.3