From f221d905b131158cbe3cbc4320d1ecd1376c3f22 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Fri, 6 Aug 2021 09:20:59 -0400 Subject: [PATCH] [libc++] IWYU to fix Modules complaints about _LIBCPP_ASSERT. NFCI. This fixes all places that used _LIBCPP_ASSERT without including <__debug>. git grep -l _LIBCPP_ASSERT | xargs git grep -L __debug --- libcxx/include/__algorithm/sample.h | 3 ++- libcxx/include/__functional/function.h | 1 + libcxx/include/__ranges/drop_view.h | 1 + libcxx/include/__ranges/view_interface.h | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libcxx/include/__algorithm/sample.h b/libcxx/include/__algorithm/sample.h index 2aac6ff..33264c4 100644 --- a/libcxx/include/__algorithm/sample.h +++ b/libcxx/include/__algorithm/sample.h @@ -9,8 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_SAMPLE_H #define _LIBCPP___ALGORITHM_SAMPLE_H -#include <__config> #include <__algorithm/min.h> +#include <__config> +#include <__debug> #include <__random/uniform_int_distribution.h> #include diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index ba629e1..baa0135 100644 --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -11,6 +11,7 @@ #define _LIBCPP___FUNCTIONAL_FUNCTION_H #include <__config> +#include <__debug> #include <__functional/binary_function.h> #include <__functional/invoke.h> #include <__functional/unary_function.h> diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h index 099fd22..6d1a5a2 100644 --- a/libcxx/include/__ranges/drop_view.h +++ b/libcxx/include/__ranges/drop_view.h @@ -10,6 +10,7 @@ #define _LIBCPP___RANGES_DROP_VIEW_H #include <__config> +#include <__debug> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__iterator/next.h> diff --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h index 62cc5fd..3c12d1a 100644 --- a/libcxx/include/__ranges/view_interface.h +++ b/libcxx/include/__ranges/view_interface.h @@ -10,6 +10,7 @@ #define _LIBCPP___RANGES_VIEW_INTERFACE_H #include <__config> +#include <__debug> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__iterator/prev.h> -- 2.7.4