[libcxx-commits] [libcxx] [libc++][NFC] Make the exception implementation files self-contained (PR #164377)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 10 08:47:19 PST 2025


================
@@ -17,9 +21,9 @@ bool uncaught_exception() noexcept { return uncaught_exceptions() > 0; }
 
 int uncaught_exceptions() noexcept {
 #if _LIBCPPABI_VERSION > 1001
-  return __cxa_uncaught_exceptions();
+  return abi::__cxa_uncaught_exceptions();
----------------
ldionne wrote:

Can we add a test in `libcxxabi/test` to ensure this namespace exists? It's indeed specified in the Itanium C++ ABI.

```
#include <cxxabi.h>

// Make sure the `abi` namespace already exists.
namespace abi_should_already_should_exist = abi;

// Now, re-declare it: it's an error if it already exists but is defined to something else.
namespace abi = __cxxabiv1;
```

https://github.com/llvm/llvm-project/pull/164377


More information about the libcxx-commits mailing list