[libcxx-commits] [libcxxabi] [libcxx] [libc++] Remove dependence on <ciso646> (PR #73271)
Michael Kenzel via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 29 17:54:58 PST 2023
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/73271
>From 42ba5f776761ee87b7cd55d374a8d891f8970415 Mon Sep 17 00:00:00 2001
From: Michael Kenzel <michael.kenzel at gmail.com>
Date: Sat, 11 Nov 2023 23:31:25 +0100
Subject: [PATCH] [libc++] Remove dependence on <ciso646>
---
libcxx/test/support/container_debug_tests.h | 1 -
libcxx/test/support/test_macros.h | 15 ++++++---------
libcxxabi/src/demangle/DemangleConfig.h | 2 +-
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/libcxx/test/support/container_debug_tests.h b/libcxx/test/support/container_debug_tests.h
index c35da37a87da6eb..531a75a609a625f 100644
--- a/libcxx/test/support/container_debug_tests.h
+++ b/libcxx/test/support/container_debug_tests.h
@@ -9,7 +9,6 @@
#ifndef TEST_SUPPORT_CONTAINER_DEBUG_TESTS_H
#define TEST_SUPPORT_CONTAINER_DEBUG_TESTS_H
-#include <ciso646>
#ifndef _LIBCPP_VERSION
#error This header may only be used for libc++ tests
#endif
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index e549ec2ca7a1a71..11490eb4bbfa994 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -10,17 +10,14 @@
#ifndef SUPPORT_TEST_MACROS_HPP
#define SUPPORT_TEST_MACROS_HPP
-// Attempt to get STL specific macros like _LIBCPP_VERSION using the most
-// minimal header possible. If we're testing libc++, we should use `<__config>`.
-// If <__config> isn't available, fall back to <ciso646>.
#ifdef __has_include
-# if __has_include("<__config>")
-# include <__config>
-# define TEST_IMP_INCLUDED_HEADER
+# if __has_include("<version>")
+# include <version>
+# else
+# include <ciso646>
# endif
-#endif
-#ifndef TEST_IMP_INCLUDED_HEADER
-#include <ciso646>
+#else
+# include <ciso646>
#endif
#define TEST_STRINGIZE_IMPL(...) #__VA_ARGS__
diff --git a/libcxxabi/src/demangle/DemangleConfig.h b/libcxxabi/src/demangle/DemangleConfig.h
index dec382d0d38f8ef..d67d89bdb06927a 100644
--- a/libcxxabi/src/demangle/DemangleConfig.h
+++ b/libcxxabi/src/demangle/DemangleConfig.h
@@ -19,7 +19,7 @@
#include "../abort_message.h"
#endif
-#include <ciso646>
+#include <version>
#ifdef _MSC_VER
// snprintf is implemented in VS 2015
More information about the libcxx-commits
mailing list