summaryrefslogtreecommitdiffstats
path: root/libcxx/include/algorithm
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-05-27 20:06:01 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-05-27 20:06:01 +0000
commitc8edcb3651b753054cda0ef9e360daed540f1fe2 (patch)
treef4b213417f076e5c3b6616740952e71fdab3b7b4 /libcxx/include/algorithm
parentbf132360a8bce5a0eaffb104604bb5edc6fa82e7 (diff)
downloadbcm5719-llvm-c8edcb3651b753054cda0ef9e360daed540f1fe2.tar.gz
bcm5719-llvm-c8edcb3651b753054cda0ef9e360daed540f1fe2.zip
weekly test results plus a bug fix clang found
llvm-svn: 104877
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r--libcxx/include/algorithm28
1 files changed, 14 insertions, 14 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 01cee60bf42..e0bdefa1ed0 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -655,6 +655,20 @@ struct __debug_less
#endif // _LIBCPP_DEBUG
+// Precondition: __x != 0
+inline _LIBCPP_INLINE_VISIBILITY unsigned __ctz(unsigned __x) {return __builtin_ctz (__x);}
+inline _LIBCPP_INLINE_VISIBILITY unsigned long __ctz(unsigned long __x) {return __builtin_ctzl (__x);}
+inline _LIBCPP_INLINE_VISIBILITY unsigned long long __ctz(unsigned long long __x) {return __builtin_ctzll(__x);}
+
+// Precondition: __x != 0
+inline _LIBCPP_INLINE_VISIBILITY unsigned __clz(unsigned __x) {return __builtin_clz (__x);}
+inline _LIBCPP_INLINE_VISIBILITY unsigned long __clz(unsigned long __x) {return __builtin_clzl (__x);}
+inline _LIBCPP_INLINE_VISIBILITY unsigned long long __clz(unsigned long long __x) {return __builtin_clzll(__x);}
+
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned __x) {return __builtin_popcount (__x);}
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long __x) {return __builtin_popcountl (__x);}
+inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {return __builtin_popcountll(__x);}
+
// all_of
template <class _InputIterator, class _Predicate>
@@ -5185,20 +5199,6 @@ __rotate_right(_Tp __t, _Tp __n = 1)
return static_cast<_Tp>((__t << (__bits - __n)) | (static_cast<typename make_unsigned<_Tp>::type>(__t) >> __n));
}
-// Precondition: __x != 0
-inline _LIBCPP_INLINE_VISIBILITY unsigned __ctz(unsigned __x) {return __builtin_ctz (__x);}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long __ctz(unsigned long __x) {return __builtin_ctzl (__x);}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long __ctz(unsigned long long __x) {return __builtin_ctzll(__x);}
-
-// Precondition: __x != 0
-inline _LIBCPP_INLINE_VISIBILITY unsigned __clz(unsigned __x) {return __builtin_clz (__x);}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long __clz(unsigned long __x) {return __builtin_clzl (__x);}
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long __clz(unsigned long long __x) {return __builtin_clzll(__x);}
-
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned __x) {return __builtin_popcount (__x);}
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long __x) {return __builtin_popcountl (__x);}
-inline _LIBCPP_INLINE_VISIBILITY int __pop_count(unsigned long long __x) {return __builtin_popcountll(__x);}
-
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_ALGORITHM
OpenPOWER on IntegriCloud