mirror of
https://github.com/intel/llvm.git
synced 2026-02-04 11:38:04 +08:00
__exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means that we don't provide the strong exception guarantees. However, Clang doesn't generate cleanup code with exceptions disabled, so even if we wanted to provide the strong exception guarantees we couldn't. This is also only relevant for constructs with a stack of -fexceptions > -fno-exceptions > -fexceptions code, since the exception can't be caught where exceptions are disabled. While -fexceptions > -fno-exceptions is quite common (e.g. libc++.dylib > -fno-exceptions), having another layer with exceptions enabled seems a lot less common, especially one that tries to catch an exception through -fno-exceptions code. Fixes https://github.com/llvm/llvm-project/issues/56783 Reviewed By: ldionne, Mordante, huixie90, #libc Spies: EricWF, alexfh, hans, joanahalili, libcxx-commits Differential Revision: https://reviews.llvm.org/D133661