================
@@ -316,11 +319,34 @@ void CIRGenFunction::popCleanupBlock() {
                              ? scope.getActiveFlag()
                              : Address::invalid();
 
-  bool requiresNormalCleanup = scope.isNormalCleanup();
+  // When deactivating, suppress normal cleanup emission. The cleanup should
+  // not fire on the normal exit path. EH cleanup is still needed so that
+  // exceptions during the body are handled.
+  bool requiresNormalCleanup = scope.isNormalCleanup() && !forDeactivation;
   bool requiresEHCleanup = scope.isEHCleanup();
 
+  // When deactivating a cleanup that still needs EH protection, downgrade
----------------
erichkeane wrote:

They are taking quite a while getting to the point and are seemingly imprecise? 
 And they seem to care about things that happen later in a way that doesn't 
treat them as such.

I read these before making my above comments, and it wasn't really clear what 
was going on (and frankly, I'm not sure they are better now that I've read your 
above response.

https://github.com/llvm/llvm-project/pull/191316
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to