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
diff --git a/include/__bit_reference b/include/__bit_reference
index 8f24546..9aea961 100644
--- a/include/__bit_reference
+++ b/include/__bit_reference
@@ -40,11 +40,8 @@
__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 @@
__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 @@
__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>;