| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| # pragma GCC system_header |
| #ifdef _LIBCPP_COMPILER_GCC |
| // 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). |
| // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107795 for more details. |
| // Therefore, we manually re-create the necessary include sequence below: |
| // Get the system limits.h defines (force recurse into the next level) |
| #define _GCC_NEXT_LIMITS_H |
| # if __has_include_next(<limits.h>) |
| # include_next <limits.h> |
| #endif // _LIBCPP_COMPILER_GCC |
| #endif // _LIBCPP_LIMITS_H |