[libcxx-commits] [libcxx] 46a5de6 - [libc++] Remove a few __has_foo defines in __config (#90511)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 2 07:37:16 PDT 2024


Author: Louis Dionne
Date: 2024-05-02T08:37:13-06:00
New Revision: 46a5de69c03aeb1cd99c7951787b7cf94d6e2dcd

URL: https://github.com/llvm/llvm-project/commit/46a5de69c03aeb1cd99c7951787b7cf94d6e2dcd
DIFF: https://github.com/llvm/llvm-project/commit/46a5de69c03aeb1cd99c7951787b7cf94d6e2dcd.diff

LOG: [libc++] Remove a few __has_foo defines in __config (#90511)

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.

Added: 
    

Modified: 
    libcxx/include/__config

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index e4c5c685a45645..104a244cc82cc4 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