[libcxx-commits] [libcxx] 561105f - [libc++] Fix ODR violation with __exception_guard in mixed exceptions builds
Alexander Kornienko via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 1 06:01:24 PST 2023
Author: Alexander Kornienko
Date: 2023-02-01T15:01:12+01:00
New Revision: 561105fb9d3a16f7fb8c718cc5da71b11f17a144
URL: https://github.com/llvm/llvm-project/commit/561105fb9d3a16f7fb8c718cc5da71b11f17a144
DIFF: https://github.com/llvm/llvm-project/commit/561105fb9d3a16f7fb8c718cc5da71b11f17a144.diff
LOG: [libc++] Fix ODR violation with __exception_guard in mixed exceptions builds
This fix was proposed in https://reviews.llvm.org/D133661#4095018
Added:
Modified:
libcxx/include/__utility/exception_guard.h
Removed:
################################################################################
diff --git a/libcxx/include/__utility/exception_guard.h b/libcxx/include/__utility/exception_guard.h
index 737d1a69c9717..ccbf75f039dc5 100644
--- a/libcxx/include/__utility/exception_guard.h
+++ b/libcxx/include/__utility/exception_guard.h
@@ -89,7 +89,7 @@ struct __exception_guard {
};
#else // _LIBCPP_NO_EXCEPTIONS
template <class _Rollback>
-struct __exception_guard {
+struct [[gnu::abi_tag("-fno-exceptions")]] __exception_guard {
__exception_guard() = delete;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_NODEBUG explicit __exception_guard(_Rollback) {}
More information about the libcxx-commits
mailing list