[libcxx-commits] [PATCH] D138438: [libc++] Don't workaround GCC issue on non-GCC compilers

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 21 13:09:15 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4548fca74272: [libc++] Don't workaround GCC issue on non-GCC compilers (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138438/new/

https://reviews.llvm.org/D138438

Files:
  libcxx/include/limits.h


Index: libcxx/include/limits.h
===================================================================
--- libcxx/include/limits.h
+++ libcxx/include/limits.h
@@ -43,13 +43,8 @@
 #  pragma GCC system_header
 #endif
 
-#ifndef __GNUC__
+#ifdef _LIBCPP_COMPILER_GCC
 
-#  if __has_include_next(<limits.h>)
-#    include_next <limits.h>
-#  endif
-
-#else
 // GCC header limits.h recursively includes itself through another header called
 // syslimits.h for some reason. This setup breaks down if we directly
 // #include_next GCC's limits.h (reasons not entirely clear to me).
@@ -64,6 +59,13 @@
 // Get the ISO C defines
 #undef _GCC_LIMITS_H_
 #include_next <limits.h>
-#endif // __GNUC__
+
+#else
+
+#  if __has_include_next(<limits.h>)
+#    include_next <limits.h>
+#  endif
+
+#endif // _LIBCPP_COMPILER_GCC
 
 #endif // _LIBCPP_LIMITS_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138438.476983.patch
Type: text/x-patch
Size: 838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221121/0fba5b96/attachment.bin>


More information about the libcxx-commits mailing list