Compare commits

..

4 Commits

Author SHA1 Message Date
Bryce Lelbach (wash)
1179b32b93 GCC: fix __config for always inline/variadics 2011-04-22 14:56:55 +09:00
Bryce Lelbach (wash)
1160236b87 CMake: Change check target to libcxx.check to avoid CMake target conflicts. 2011-04-22 14:56:32 +09:00
Bryce Lelbach (wash)
afb2c7d9ff CMake: Install to include/libcxx/v1 instead of lib/c++/v1, don't depend on headers. 2011-04-22 14:56:17 +09:00
Bryce Lelbach (wash)
58da822e10 CMake: fix minimum version required: 2.6.4 works. 2011-04-22 14:56:04 +09:00
14 changed files with 42 additions and 259 deletions

View File

@@ -5,10 +5,10 @@
#===============================================================================
project(libcxx CXX C)
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.6.4)
set(PACKAGE_NAME libcxx)
set(PACKAGE_VERSION trunk-svn)
set(PACKAGE_VERSION lll)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu")

View File

@@ -1609,7 +1609,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint,
const_iterator __next = _STD::next(__hint);
if (__next == end() || value_comp()(__v, *__next))
{
// *__hint < __v < *_STD::next(__hint)
// *__hint < __v < *next(__hint)
if (__hint.__ptr_->__right_ == nullptr)
{
__parent = const_cast<__node_pointer&>(__hint.__ptr_);

View File

@@ -30,43 +30,25 @@ Macros:
#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
#ifdef ELAST
const int __elast1 = ELAST+1;
const int __elast2 = ELAST+2;
#else
const int __elast1 = 104;
const int __elast2 = 105;
#endif
#undef ELAST
#ifdef ENOTRECOVERABLE
#define EOWNERDEAD __elast1
#ifdef ELAST
#undef ELAST
#define ELAST EOWNERDEAD
#endif
#elif defined(EOWNERDEAD)
#define ENOTRECOVERABLE __elast1
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif
#else // defined(EOWNERDEAD)
#define EOWNERDEAD __elast1
#define ENOTRECOVERABLE __elast2
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif
#endif // defined(EOWNERDEAD)

View File

@@ -1787,7 +1787,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = __move_and_check(_STD::next(__b), __b + __pos, __b, __vt);
__b = __move_and_check(next(__b), __b + __pos, __b, __vt);
*__b = *__vt;
}
}
@@ -1847,7 +1847,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = _STD::move(_STD::next(__b), __b + __pos, __b);
__b = _STD::move(next(__b), __b + __pos, __b);
*__b = _STD::move(__v);
}
}
@@ -1905,7 +1905,7 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
--__base::__start_;
++__base::size();
if (__pos > 1)
__b = _STD::move(_STD::next(__b), __b + __pos, __b);
__b = _STD::move(next(__b), __b + __pos, __b);
*__b = value_type(_STD::forward<_Args>(__args)...);
}
}
@@ -2621,7 +2621,7 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
}
else
{ // erase from back
iterator __i = _STD::move(_STD::next(__p), __base::end(), __p);
iterator __i = _STD::move(next(__p), __base::end(), __p);
__alloc_traits::destroy(__a, _STD::addressof(*__i));
--__base::size();
if (__back_spare() >= 2 * __base::__block_size)

View File

@@ -2346,12 +2346,6 @@ time_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
__b = get(__b, __e, __iob, __err, __tm, __fmt, __fmt + sizeof(__fmt)/sizeof(__fmt[0]));
}
break;
case 'F':
{
const char_type __fmt[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
__b = get(__b, __e, __iob, __err, __tm, __fmt, __fmt + sizeof(__fmt)/sizeof(__fmt[0]));
}
break;
case 'H':
__get_hour(__tm->tm_hour, __b, __e, __err, __ct);
break;

View File

@@ -567,9 +567,9 @@ public:
typedef const value_type& reference;
typedef typename __pointer_traits::template
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
rebind<const value_type>
rebind<value_type>
#else
rebind<const value_type>::other
rebind<value_type>::other
#endif
pointer;

View File

@@ -1650,16 +1650,6 @@ class piecewise_linear_distribution
_LIBCPP_BEGIN_NAMESPACE_STD
// __is_seed_sequence
template <class _Sseq, class _Engine>
struct __is_seed_sequence
{
static const bool value =
!is_convertible<_Sseq, typename _Engine::result_type>::value &&
!is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
};
// linear_congruential_engine
template <unsigned long long __a, unsigned long long __c,
@@ -1858,7 +1848,7 @@ public:
{seed(__s);}
template<class _Sseq> explicit linear_congruential_engine(_Sseq& __q,
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0)
typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
{seed(__q);}
_LIBCPP_INLINE_VISIBILITY
void seed(result_type __s = default_seed)
@@ -1868,7 +1858,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, linear_congruential_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q)
@@ -2114,14 +2104,14 @@ public:
{seed(__sd);}
template<class _Sseq> explicit mersenne_twister_engine(_Sseq& __q,
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0)
typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
{seed(__q);}
void seed(result_type __sd = default_seed);
template<class _Sseq>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, mersenne_twister_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q)
@@ -2483,7 +2473,7 @@ public:
{seed(__sd);}
template<class _Sseq> explicit subtract_with_carry_engine(_Sseq& __q,
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0)
typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
{seed(__q);}
_LIBCPP_INLINE_VISIBILITY
void seed(result_type __sd = default_seed)
@@ -2492,7 +2482,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q)
@@ -2751,7 +2741,7 @@ public:
template<class _Sseq>
_LIBCPP_INLINE_VISIBILITY
explicit discard_block_engine(_Sseq& __q,
typename enable_if<__is_seed_sequence<_Sseq, discard_block_engine>::value &&
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
!is_convertible<_Sseq, _Engine>::value>::type* = 0)
: __e_(__q), __n_(0) {}
_LIBCPP_INLINE_VISIBILITY
@@ -2762,7 +2752,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, discard_block_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q) {__e_.seed(__q); __n_ = 0;}
@@ -2950,7 +2940,7 @@ public:
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
template<class _Sseq> explicit independent_bits_engine(_Sseq& __q,
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__is_seed_sequence<_Sseq, independent_bits_engine>::value &&
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
!is_convertible<_Sseq, _Engine>::value>::type* = 0)
: __e_(__q) {}
_LIBCPP_INLINE_VISIBILITY
@@ -2961,7 +2951,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, independent_bits_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q) {__e_.seed(__q);}
@@ -3173,7 +3163,7 @@ public:
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
template<class _Sseq> explicit shuffle_order_engine(_Sseq& __q,
_LIBCPP_INLINE_VISIBILITY
typename enable_if<__is_seed_sequence<_Sseq, shuffle_order_engine>::value &&
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
!is_convertible<_Sseq, _Engine>::value>::type* = 0)
: __e_(__q) {__init();}
_LIBCPP_INLINE_VISIBILITY
@@ -3184,7 +3174,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
__is_seed_sequence<_Sseq, shuffle_order_engine>::value,
!is_convertible<_Sseq, result_type>::value,
void
>::type
seed(_Sseq& __q) {__e_.seed(__q); __init();}
@@ -4477,7 +4467,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
{
result_type __x;
uniform_real_distribution<double> __urd;
if (__pr.__mean_ < 10)
if (__pr.__mean_ <= 10)
{
__x = 0;
for (double __p = __urd(__urng); __p > __pr.__l_; ++__x)

View File

@@ -211,13 +211,6 @@ struct _LIBCPP_VISIBLE pair
_LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
: first(__x), second(__y) {}
template<class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY
pair(const pair<_U1, _U2>& __p,
typename enable_if<is_convertible<_U1, _T1>::value &&
is_convertible<_U2, _T2>::value>::type* = 0)
: first(__p.first), second(__p.second) {}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _U1, class _U2,
@@ -229,14 +222,6 @@ struct _LIBCPP_VISIBLE pair
second(_STD::forward<_U2>(__u2))
{}
template<class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY
pair(pair<_U1, _U2>&& __p,
typename enable_if<is_convertible<_U1, _T1>::value &&
is_convertible<_U2, _T2>::value>::type* = 0)
: first(_STD::forward<_U1>(__p.first)),
second(_STD::forward<_U2>(__p.second)) {}
#ifndef _LIBCPP_HAS_NO_VARIADICS
template<class _Tuple,
@@ -276,6 +261,10 @@ struct _LIBCPP_VISIBLE pair
#endif // _LIBCPP_HAS_NO_VARIADICS
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template<class _U1, class _U2>
_LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p)
: first(__p.first), second(__p.second) {}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void _LIBCPP_INLINE_VISIBILITY swap(pair& __p) {_STD::swap(*this, __p);}
private:

View File

@@ -14,12 +14,10 @@ endif()
if (LIBCXX_ENABLE_SHARED)
add_library(cxx SHARED
${sources}
${headers}
)
else()
add_library(cxx STATIC
${sources}
${headers}
)
endif()
@@ -50,8 +48,10 @@ install(TARGETS cxx
)
install(DIRECTORY ../include/
DESTINATION include/c++/v1
DESTINATION include/libcxx/v1
FILES_MATCHING
PATTERN "*"
PATTERN ".svn" EXCLUDE
PATTERN ".git" EXCLUDE
)

View File

@@ -17,11 +17,6 @@ then
CXX=clang++
fi
if [ -z "$CC" ]
then
CC=clang
fi
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
then
MACOSX_DEPLOYMENT_TARGET=10.6
@@ -34,7 +29,7 @@ fi
case $TRIPLE in
*-apple-*)
if [ -z $RC_XBS ]
if [ -z $RC_BUILDIT ]
then
RC_CFLAGS="-arch i386 -arch x86_64"
fi
@@ -50,24 +45,16 @@ case $TRIPLE in
-Wl,-unexported_symbols_list,libc++unexp.exp \
/usr/lib/libSystem.B.dylib"
else
EXTRA_FLAGS="-std=c++0x "
RE_EXPORT_FILE="libc++abi.exp"
if [ -n "$SDKROOT" ]
then
EXTRA_FLAGS+="-isysroot ${SDKROOT}"
RE_EXPORT_FILE="libc++sjlj-abi.exp"
CXX=`xcrun -sdk "${SDKROOT}" -find clang++`
CC=`xcrun -sdk "${SDKROOT}" -find clang`
fi
LDSHARED_FLAGS="-o libc++.1.dylib \
EXTRA_FLAGS="-std=c++0x"
LDSHARED_FLAGS="-o libc++.1.dylib \
-dynamiclib -nodefaultlibs \
-current_version ${RC_ProjectSourceVersion} -compatibility_version 1 \
-install_name /usr/lib/libc++.1.dylib \
${SDKROOT}/usr/lib/libc++abi.dylib \
-lSystem \
-Wl,-unexported_symbols_list,libc++unexp.exp \
-Wl,-reexported_symbols_list,${RE_EXPORT_FILE} \
-Wl,-force_symbols_not_weak_list,notweak.exp "
-Wl,-reexported_symbols_list,libc++abi.exp \
-Wl,-force_symbols_not_weak_list,notweak.exp"
fi
;;
*)
@@ -79,7 +66,7 @@ case $TRIPLE in
;;
esac
if [ -z $RC_XBS ]
if [ -z $RC_BUILDIT ]
then
rm -f libc++.1.$SOEXT*
fi
@@ -91,11 +78,11 @@ for FILE in ../src/*.cpp; do
done
$CC *.o $RC_CFLAGS $LDSHARED_FLAGS $EXTRA_FLAGS
cc *.o $RC_CFLAGS $LDSHARED_FLAGS
#libtool -static -o libc++.a *.o
if [ -z $RC_XBS ]
if [ -z $RC_BUILDIT ]
then
rm *.o
fi

View File

@@ -1,159 +0,0 @@
___cxa_allocate_exception
___cxa_end_catch
___cxa_demangle
___cxa_current_exception_type
___cxa_call_unexpected
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_get_globals
___cxa_get_globals_fast
___cxa_guard_abort
___cxa_guard_acquire
___cxa_guard_release
___cxa_rethrow
___cxa_pure_virtual
___cxa_begin_catch
___cxa_throw
___cxa_vec_cctor
___cxa_vec_cleanup
___cxa_vec_ctor
___cxa_vec_delete
___cxa_vec_delete2
___cxa_vec_delete3
___cxa_vec_dtor
___cxa_vec_new
___cxa_vec_new2
___cxa_vec_new3
___dynamic_cast
___gxx_personality_sj0
#__ZTIDi
#__ZTIDn
#__ZTIDs
#__ZTIPDi
#__ZTIPDn
#__ZTIPDs
#__ZTIPKDi
#__ZTIPKDn
#__ZTIPKDs
__ZTSPm
__ZTSPl
__ZTSPj
__ZTSPi
__ZTSPh
__ZTSPf
__ZTSPe
__ZTSPd
__ZTSPc
__ZTSPb
__ZTSPa
__ZTSPKc
__ZTSPKy
__ZTSPKx
__ZTSPKw
__ZTSPKv
__ZTSPKt
__ZTSPKs
__ZTSPKm
__ZTSPKl
__ZTSPKi
__ZTSPKh
__ZTSPs
__ZTSPt
__ZTSPv
__ZTSPw
__ZTSPKa
__ZTSPx
__ZTSPy
__ZTSPKd
__ZTSPKe
__ZTSPKj
__ZTSPKb
__ZTSPKf
__ZTSv
__ZTSt
__ZTSs
__ZTSm
__ZTSl
__ZTSj
__ZTSi
__ZTSh
__ZTSf
__ZTSe
__ZTSd
__ZTSc
__ZTSw
__ZTSx
__ZTSy
__ZTSb
__ZTSa
__ZTIPKh
__ZTIPKf
__ZTIPKe
__ZTIPKd
__ZTIPKc
__ZTIPKb
__ZTIPKa
__ZTIPy
__ZTIPx
__ZTIPw
__ZTIPv
__ZTIPt
__ZTIPs
__ZTIPm
__ZTIPl
__ZTIPj
__ZTIPi
__ZTIPKi
__ZTIPKj
__ZTIPKl
__ZTIPKm
__ZTIPKs
__ZTIPKt
__ZTIPKv
__ZTIPKw
__ZTIPKx
__ZTIPKy
__ZTIPa
__ZTIPb
__ZTIPc
__ZTIPd
__ZTIPe
__ZTIPf
__ZTIPh
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
__ZTVN10__cxxabiv116__enum_type_infoE
__ZTVN10__cxxabiv117__array_type_infoE
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv117__pbase_type_infoE
__ZTVN10__cxxabiv119__pointer_type_infoE
__ZTVN10__cxxabiv120__function_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZTVN10__cxxabiv121__vmi_class_type_infoE
__ZTVN10__cxxabiv123__fundamental_type_infoE
__ZTIa
__ZTIb
__ZTIc
__ZTId
__ZTIe
__ZTIf
__ZTIh
__ZTIi
__ZTIj
__ZTIl
__ZTIm
__ZTIs
__ZTIt
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE
__ZTSN10__cxxabiv123__fundamental_type_infoE
__ZTSN10__cxxabiv121__vmi_class_type_infoE
__ZTSN10__cxxabiv120__si_class_type_infoE
__ZTSN10__cxxabiv120__function_type_infoE
__ZTSN10__cxxabiv119__pointer_type_infoE
__ZTSN10__cxxabiv117__pbase_type_infoE
__ZTSN10__cxxabiv117__class_type_infoE
__ZTSN10__cxxabiv117__array_type_infoE
__ZTSN10__cxxabiv116__enum_type_infoE
__ZTIy
__ZTIx
__ZTIw
__ZTIv

View File

@@ -32,7 +32,7 @@ if(PYTHONINTERP_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@ONLY)
add_custom_target(check
add_custom_target(libcxx.check
COMMAND ${PYTHON_EXECUTABLE}
${LIT_EXECUTABLE}
${LIT_ARGS}
@@ -40,5 +40,5 @@ if(PYTHONINTERP_FOUND)
DEPENDS
COMMENT "Running libcxx tests")
else()
message(WARNING "Could not find Python, no check target will be available!")
message(WARNING "Could not find Python, no libcxx.check target will be available!")
endif()

View File

@@ -40,7 +40,7 @@ test2()
typedef std::mt19937_64 E;
E e1;
e1();
E e2(e1);
E e2 = e1;
assert(e1 == e2);
assert(e1() == e2());
E::result_type k = e1();

View File

@@ -38,7 +38,7 @@ test2()
typedef std::ranlux48_base E;
E e1;
e1();
E e2(e1);
E e2 = e1;
assert(e1 == e2);
assert(e1() == e2());
E::result_type k = e1();