[libc++][NFC] Fix include guard for decay_copy.h and remove underscores from the header

We don't use double underscores for private header names when they are
in a subdirectory with double underscores already.

Differential Revision: https://reviews.llvm.org/D108820
This commit is contained in:
Louis Dionne 2021-08-27 10:36:04 -04:00
parent 64184b4af0
commit c8b14c03ec
10 changed files with 13 additions and 13 deletions
libcxx

View File

@ -264,9 +264,9 @@ set(files
__tree
__tuple
__undef_macros
__utility/__decay_copy.h
__utility/as_const.h
__utility/cmp.h
__utility/decay_copy.h
__utility/declval.h
__utility/exchange.h
__utility/forward.h

View File

@ -13,8 +13,8 @@
#include <__iterator/concepts.h>
#include <__iterator/readable_traits.h>
#include <__ranges/enable_borrowed_range.h>
#include <__utility/__decay_copy.h>
#include <__utility/as_const.h>
#include <__utility/decay_copy.h>
#include <__utility/forward.h>
#include <concepts>
#include <type_traits>

View File

@ -17,7 +17,7 @@
#include <__ranges/range_adaptor.h>
#include <__ranges/ref_view.h>
#include <__ranges/subrange.h>
#include <__utility/__decay_copy.h>
#include <__utility/decay_copy.h>
#include <__utility/declval.h>
#include <__utility/forward.h>
#include <type_traits>

View File

@ -18,7 +18,7 @@
#include <__memory/pointer_traits.h>
#include <__ranges/concepts.h>
#include <__ranges/subrange.h>
#include <__utility/__decay_copy.h>
#include <__utility/decay_copy.h>
#include <__utility/declval.h>
#include <__utility/forward.h>
#include <__utility/move.h>

View File

@ -13,7 +13,7 @@
#include <__iterator/concepts.h>
#include <__iterator/iterator_traits.h>
#include <__ranges/access.h>
#include <__utility/__decay_copy.h>
#include <__utility/decay_copy.h>
#include <__utility/forward.h>
#include <concepts>
#include <type_traits>

View File

@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___TYPE_TRAITS_DECAY_COPY_H
#define _LIBCPP___TYPE_TRAITS_DECAY_COPY_H
#ifndef _LIBCPP___UTILITY_DECAY_COPY_H
#define _LIBCPP___UTILITY_DECAY_COPY_H
#include <__config>
#include <__utility/forward.h>
@ -31,4 +31,4 @@ inline _LIBCPP_INLINE_VISIBILITY typename decay<_Tp>::type __decay_copy(_Tp&& __
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___TYPE_TRAITS_DECAY_COPY_H
#endif // _LIBCPP___UTILITY_DECAY_COPY_H

View File

@ -366,7 +366,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__debug>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
#include <__utility/__decay_copy.h>
#include <__utility/decay_copy.h>
#include <__utility/forward.h>
#include <chrono>
#include <exception>

View File

@ -789,9 +789,9 @@ module std [system] {
export *
module __utility {
module __decay_copy { private header "__utility/__decay_copy.h" }
module as_const { private header "__utility/as_const.h" }
module cmp { private header "__utility/cmp.h" }
module decay_copy { private header "__utility/decay_copy.h" }
module declval { private header "__utility/declval.h" }
module exchange { private header "__utility/exchange.h" }
module forward { private header "__utility/forward.h" }

View File

@ -87,7 +87,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__functional_base>
#include <__mutex_base>
#include <__threading_support>
#include <__utility/__decay_copy.h>
#include <__utility/decay_copy.h>
#include <__utility/forward.h>
#include <chrono>
#include <cstddef>

View File

@ -12,5 +12,5 @@
// WARNING: This test was generated by 'generate_private_header_tests.py'
// and should not be edited manually.
// expected-error@*:* {{use of private header from outside its module: '__utility/__decay_copy.h'}}
#include <__utility/__decay_copy.h>
// expected-error@*:* {{use of private header from outside its module: '__utility/decay_copy.h'}}
#include <__utility/decay_copy.h>