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/CodeGenFunction.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 24fcd72..613e7df 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -79,12 +79,6 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm, bool suppressNewContext) CodeGenFunction::~CodeGenFunction() { assert(LifetimeExtendedCleanupStack.empty() && "failed to emit a cleanup"); - // If there are any unclaimed block infos, go ahead and destroy them - // now. This can happen if IR-gen gets clever and skips evaluating - // something. - if (FirstBlockInfo) - destroyBlockInfos(FirstBlockInfo); - if (getLangOpts().OpenMP && CurFn) CGM.getOpenMPRuntime().functionFinished(*this); -- cgit v1.1