[libcxx-commits] [libcxx] [libc++] Remove a few __has_foo defines in __config (PR #90511)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 1 09:25:55 PDT 2024
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/90511
>From 66483e04261aa69dd85947baa8d4a5ee52c7faea Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 29 Apr 2024 09:43:02 -0400
Subject: [PATCH] [libc++] Remove a few __has_foo defines in __config
All the compilers we support implement those macros or builtins,
so it's not useful to have a fallback to 0 when they're not implemented.
---
libcxx/include/__config | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 97cdd020c55d1f..68bade747a6f97 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -334,26 +334,16 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _LIBCPP_CXX03_LANG
# endif
-# ifndef __has_attribute
-# define __has_attribute(__x) 0
-# endif
-
-# ifndef __has_builtin
-# define __has_builtin(__x) 0
-# endif
-
+// TODO: Remove once we switch to GCC 14
# ifndef __has_extension
# define __has_extension(__x) 0
# endif
+// TODO: Remove once we switch to GCC 14
# ifndef __has_feature
# define __has_feature(__x) 0
# endif
-# ifndef __has_cpp_attribute
-# define __has_cpp_attribute(__x) 0
-# endif
-
# ifndef __has_constexpr_builtin
# define __has_constexpr_builtin(x) 0
# endif
@@ -375,10 +365,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define __has_keyword(__x) !(__is_identifier(__x))
-# ifndef __has_include
-# define __has_include(...) 0
-# endif
-
# ifndef __has_warning
# define __has_warning(...) 0
# endif
More information about the libcxx-commits
mailing list