From 561105fb9d3a16f7fb8c718cc5da71b11f17a144 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 1 Feb 2023 13:23:04 +0100 Subject: [PATCH] [libc++] Fix ODR violation with __exception_guard in mixed exceptions builds This fix was proposed in https://reviews.llvm.org/D133661#4095018 --- libcxx/include/__utility/exception_guard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__utility/exception_guard.h b/libcxx/include/__utility/exception_guard.h index 737d1a6..ccbf75f 100644 --- a/libcxx/include/__utility/exception_guard.h +++ b/libcxx/include/__utility/exception_guard.h @@ -89,7 +89,7 @@ private: }; #else // _LIBCPP_NO_EXCEPTIONS template -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) {} -- 2.7.4