From 6efb2063927242768772bc554775f54ba4d499bd Mon Sep 17 00:00:00 2001 From: Wesley Maxey Date: Tue, 3 Aug 2021 17:37:57 -0700 Subject: [PATCH] Fix a few includes occuring within internal namespaces --- libcxx/include/atomic | 8 ++++++++ libcxx/include/support/atomic/atomic_base.h | 2 -- libcxx/include/support/atomic/atomic_cuda.h | 4 ---- libcxx/include/support/atomic/atomic_msvc.h | 2 -- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libcxx/include/atomic b/libcxx/include/atomic index d20ebf4945..ceb679ae6f 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -588,6 +588,14 @@ void atomic_signal_fence(memory_order m) noexcept; __f == memory_order_acq_rel, \ "memory order argument to atomic operation is invalid") +#if defined(_LIBCUDACXX_HAS_MSVC_ATOMIC_IMPL) +# include +#endif + +#if !defined(_LIBCUDACXX_COMPILER_NVRTC) +# include +#endif + _LIBCUDACXX_BEGIN_NAMESPACE_STD // Figure out what the underlying type for `memory_order` would be if it were diff --git a/libcxx/include/support/atomic/atomic_base.h b/libcxx/include/support/atomic/atomic_base.h index 54450a7f41..548f636a40 100644 --- a/libcxx/include/support/atomic/atomic_base.h +++ b/libcxx/include/support/atomic/atomic_base.h @@ -11,8 +11,6 @@ #ifndef _LIBCUDACXX_ATOMIC_BASE_H #define _LIBCUDACXX_ATOMIC_BASE_H -#include - template struct __cxx_atomic_base_impl { using __underlying_t = _Tp; diff --git a/libcxx/include/support/atomic/atomic_cuda.h b/libcxx/include/support/atomic/atomic_cuda.h index b022147bde..b0e17c5bd8 100644 --- a/libcxx/include/support/atomic/atomic_cuda.h +++ b/libcxx/include/support/atomic/atomic_cuda.h @@ -11,10 +11,6 @@ # error "CUDA atomics are only supported for sm_60 and up on *nix and sm_70 and up on Windows." #endif -#ifndef __CUDACC_RTC__ -#include -#endif // __CUDACC_RTC__ - #if !defined(__CLANG_ATOMIC_BOOL_LOCK_FREE) && !defined(__GCC_ATOMIC_BOOL_LOCK_FREE) #define ATOMIC_BOOL_LOCK_FREE 2 #define ATOMIC_CHAR_LOCK_FREE 2 diff --git a/libcxx/include/support/atomic/atomic_msvc.h b/libcxx/include/support/atomic/atomic_msvc.h index 8a8084449a..9294a7fa3b 100644 --- a/libcxx/include/support/atomic/atomic_msvc.h +++ b/libcxx/include/support/atomic/atomic_msvc.h @@ -12,8 +12,6 @@ #error "This file is only for CL.EXE's benefit" #endif -#include - #define _Compiler_barrier() _ReadWriteBarrier() #if defined(_M_ARM) || defined(_M_ARM64)