[libcxx-commits] [libcxx] [libc++] Guard ..._REMOVED_UNCAUGHT_EXCEPTION behind ifndef (PR #106719)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 30 05:35:45 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Danial Klimkin (dklimkin)

<details>
<summary>Changes</summary>

Resolves "macro redefined" error when _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION is also set on command line by a build system.

---
Full diff: https://github.com/llvm/llvm-project/pull/106719.diff


1 Files Affected:

- (modified) libcxx/src/exception.cpp (+2) 


``````````diff
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index ac6324cd9fe355..bc1be282cd7db4 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -6,7 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION
 #define _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION
+#endif
 #define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <exception>

``````````

</details>


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


More information about the libcxx-commits mailing list