[libcxx-commits] [libcxx] [libc++] Avoid redefining _LIBCPP_DISABLE_DEPRECATION_WARNINGS if already defined. (PR #107340)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 4 18:26:54 PDT 2024
https://github.com/atulkatti created https://github.com/llvm/llvm-project/pull/107340
The following commit defines LIBCPP_DISABLE_DEPRECATION_WARNINGS to libcxx/src/exception.cpp
https://github.com/llvm/llvm-project/commit/1e9c654671d32bdeed867d16889f6451135cdbdb
However, Edge builds already built with LIBCPP_DISABLE_DEPRECATION_WARNINGS as we work towards removing some deprecated functions usage. This results in macro redefinition errors. This PR checks that the macro isn't defined already to avoid redefinition.
>From 4521bdf2ac0d8d7300b9a6bf42bbf2dca427bef4 Mon Sep 17 00:00:00 2001
From: atul <atul.katti at microsoft.com>
Date: Wed, 4 Sep 2024 18:23:53 -0700
Subject: [PATCH] [libc++] Avoid redefining
_LIBCPP_DISABLE_DEPRECATION_WARNINGS in exception.cpp in external builds.
---
libcxx/src/exception.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index ac6324cd9fe355..bbfb761595640a 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -7,7 +7,10 @@
//===----------------------------------------------------------------------===//
#define _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION
+
+#ifndef _LIBCPP_DISABLE_DEPRECATION_WARNINGS
#define _LIBCPP_DISABLE_DEPRECATION_WARNINGS
+#endif
#include <exception>
#include <new>
More information about the libcxx-commits
mailing list