llvm-project
abb228af - [CIR] Fix handling of cleanup scopes inside a try body (#183869)

Commit
51 days ago
[CIR] Fix handling of cleanup scopes inside a try body (#183869) We had a problem where scope terminators were not being created correctly when a cleanup scope appeared inside the body of a try operation. This was caused by cleanup scope operation not being properly flushed before the try body scope was completed. This change fixes the problem by creating a RunCleanupsScope in the lambda that pupulates the try body and forcing cleanups before adding the yield terminator to the try body. The test case also exposed a secondary bug where we were not properly updating the innermostEHScope variable when popping a cleanup from the eh stack. That is also fixed here.
Author
Parents
Loading