[libcxx-commits] [PATCH] D143071: [libc++] Add abi_tag on __exception_guard to avoid ODR violations
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 1 07:54:14 PST 2023
philnik added inline comments.
================
Comment at: libcxx/include/__config:446-447
+// Use this tag to avoid ODR violations when combining -fno-exceptions and -fexceptions code.
+# ifdef _LIBCPP_NO_EXCEPTIONS
+# define _LIBCPP_EXCEPTION_ABI_TAG __attribute__((__abi_tag__("-fno-exceptions")))
+# else
----------------
rupprecht wrote:
> Is there a reason this is conditionally defined? The value of `LIBCPP_EXCEPTION_ABI_TAG` is only used when `_LIBCPP_NO_EXCEPTIONS` is enabled, so it would be possible to unconditionally set it to this.
This makes it possible to use the tag for other cases where we have ODR violations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143071/new/
https://reviews.llvm.org/D143071
More information about the libcxx-commits
mailing list