EHTerminateScope is used to implement C++ noexcept semantics. Per C++ [except.terminate], it is implemented-defined whether no, some, or all cleanups are run prior to terminatation. Therefore, the code to run cleanups on the way towards termination is unnecessary, and may be omitted. After this change, we will still run some cleanups: any cleanups in a function called from the noexcept function will continue to run, while those in the noexcept function itself will not. (Commit attempt 2: check InnermostEHScope != stable_end() before accessing it.) Differential Revision: https://reviews.llvm.org/D113620
55 KiB
55 KiB