From 9807626bc721a2330758c449548e89913f1826af Mon Sep 17 00:00:00 2001 From: Joe Loser Date: Fri, 20 Aug 2021 15:02:03 -0400 Subject: [PATCH] [libc++] Include <__iterator/distance.h> instead of in a few algorithm headers A few headers in algorithm include `` when `<__iterator/distance.h>` would suffice. Change them to just include `<__iterator.distance.h>`. Differential Revision: https://reviews.llvm.org/D108393 --- libcxx/include/__algorithm/equal.h | 3 ++- libcxx/include/__algorithm/is_permutation.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h index bc6755981963..2f47fc83a10d 100644 --- a/libcxx/include/__algorithm/equal.h +++ b/libcxx/include/__algorithm/equal.h @@ -12,8 +12,9 @@ #include <__config> #include <__algorithm/comp.h> +#include <__iterator/distance.h> #include <__iterator/iterator_traits.h> -#include // FIXME: replace with <__iterator/distance.h> when it lands +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/libcxx/include/__algorithm/is_permutation.h b/libcxx/include/__algorithm/is_permutation.h index 0545eb76370a..e33a7157ddca 100644 --- a/libcxx/include/__algorithm/is_permutation.h +++ b/libcxx/include/__algorithm/is_permutation.h @@ -12,9 +12,10 @@ #include <__algorithm/comp.h> #include <__config> +#include <__iterator/distance.h> #include <__iterator/iterator_traits.h> #include <__iterator/next.h> -#include // FIXME: replace with <__iterator/distance.h> when it lands +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header