Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.
This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_<TYPE>` macros. The goal of this patch is to make it easier to detect what compiler is being used outside of `__config`. Additionally this patch removes workarounds for GCC in `__bit_reference`. I tested GCC 4.8 and 4.9 without the workaround and neither seemed to need it anymore. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,11 +40,8 @@ class __bit_reference
|
||||
__storage_pointer __seg_;
|
||||
__storage_type __mask_;
|
||||
|
||||
#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC)
|
||||
friend typename _Cp::__self;
|
||||
#else
|
||||
friend class _Cp::__self;
|
||||
#endif
|
||||
|
||||
friend class __bit_const_reference<_Cp>;
|
||||
friend class __bit_iterator<_Cp, false>;
|
||||
public:
|
||||
@@ -130,11 +127,7 @@ class __bit_const_reference
|
||||
__storage_pointer __seg_;
|
||||
__storage_type __mask_;
|
||||
|
||||
#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC)
|
||||
friend typename _Cp::__self;
|
||||
#else
|
||||
friend class _Cp::__self;
|
||||
#endif
|
||||
friend class __bit_iterator<_Cp, true>;
|
||||
public:
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1221,11 +1214,8 @@ private:
|
||||
__bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
|
||||
: __seg_(__s), __ctz_(__ctz) {}
|
||||
|
||||
#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC)
|
||||
friend typename _Cp::__self;
|
||||
#else
|
||||
friend class _Cp::__self;
|
||||
#endif
|
||||
|
||||
friend class __bit_reference<_Cp>;
|
||||
friend class __bit_const_reference<_Cp>;
|
||||
friend class __bit_iterator<_Cp, true>;
|
||||
|
||||
Reference in New Issue
Block a user