From b4f3637cec2f4b914528bc6b27d00b8317f7a995 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 27 Apr 2018 05:56:55 +0000 Subject: Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a" This reverts commit r331016, which broke a windows bot. http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/11727 llvm-svn: 331019 --- clang/lib/CodeGen/CGCleanup.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CGCleanup.cpp') diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp index c5f935bdef5..526def2cc29 100644 --- a/clang/lib/CodeGen/CGCleanup.cpp +++ b/clang/lib/CodeGen/CGCleanup.cpp @@ -1233,10 +1233,8 @@ void CodeGenFunction::DeactivateCleanupBlock(EHScopeStack::stable_iterator C, EHCleanupScope &Scope = cast(*EHStack.find(C)); assert(Scope.isActive() && "double deactivation"); - // If it's the top of the stack, just pop it, but do so only if it belongs - // to the current RunCleanupsScope. - if (C == EHStack.stable_begin() && - CurrentCleanupScopeDepth.strictlyEncloses(C)) { + // If it's the top of the stack, just pop it. + if (C == EHStack.stable_begin()) { // If it's a normal cleanup, we need to pretend that the // fallthrough is unreachable. CGBuilderTy::InsertPoint SavedIP = Builder.saveAndClearIP(); -- cgit v1.2.3