Compare commits

..

8 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
Howard Hinnant
a02851e8a2 Chris Jefferson found a missing const (Bugzilla 9632)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128885 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05 14:55:28 +00:00
Howard Hinnant
3e93e96dff Corrected tests for http://llvm.org/bugs/show_bug.cgi?id=9351
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128807 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 01:42:30 +00:00
Howard Hinnant
b8a03c763a ... And these wonderful tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128797 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-03 20:06:31 +00:00
Howard Hinnant
d615e47bea Chris Jefferson submitted this patch to fix http://llvm.org/bugs/show_bug.cgi?id=9351
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@128796 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-03 20:05:29 +00:00
7 changed files with 59 additions and 32 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

@@ -184,10 +184,12 @@ namespace std {
#define _LIBCPP_HAS_NO_UNICODE_CHARS
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
#else // __GXX_EXPERIMENTAL_CXX0X__
#define _LIBCPP_HAS_NO_TRAILING_RETURN
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -207,7 +209,6 @@ namespace std {
#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4)
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
#define _LIBCPP_HAS_NO_NULLPTR
#endif

View File

@@ -769,6 +769,7 @@ public:
typedef typename __alloc_traits::difference_type difference_type;
typedef __tree_node<value_type, typename __alloc_traits::void_pointer> __node;
typedef __tree_node_base<typename __alloc_traits::void_pointer> __node_base;
typedef typename __alloc_traits::template
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
rebind_alloc<__node>
@@ -779,10 +780,10 @@ public:
typedef allocator_traits<__node_allocator> __node_traits;
typedef typename __node_traits::pointer __node_pointer;
typedef typename __node_traits::const_pointer __node_const_pointer;
typedef typename __node::base::pointer __node_base_pointer;
typedef typename __node::base::const_pointer __node_base_const_pointer;
typedef typename __node_base::pointer __node_base_pointer;
typedef typename __node_base::const_pointer __node_base_const_pointer;
private:
typedef typename __node::base::base __end_node_t;
typedef typename __node_base::base __end_node_t;
typedef typename pointer_traits<__node_pointer>::template
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
rebind<__end_node_t>
@@ -996,19 +997,19 @@ public:
__node_holder remove(const_iterator __p);
private:
typename __node::base::pointer&
__find_leaf_low(typename __node::base::pointer& __parent, const value_type& __v);
typename __node::base::pointer&
__find_leaf_high(typename __node::base::pointer& __parent, const value_type& __v);
typename __node::base::pointer&
typename __node_base::pointer&
__find_leaf_low(typename __node_base::pointer& __parent, const value_type& __v);
typename __node_base::pointer&
__find_leaf_high(typename __node_base::pointer& __parent, const value_type& __v);
typename __node_base::pointer&
__find_leaf(const_iterator __hint,
typename __node::base::pointer& __parent, const value_type& __v);
typename __node_base::pointer& __parent, const value_type& __v);
template <class _Key>
typename __node::base::pointer&
__find_equal(typename __node::base::pointer& __parent, const _Key& __v);
typename __node_base::pointer&
__find_equal(typename __node_base::pointer& __parent, const _Key& __v);
template <class _Key>
typename __node::base::pointer&
__find_equal(const_iterator __hint, typename __node::base::pointer& __parent,
typename __node_base::pointer&
__find_equal(const_iterator __hint, typename __node_base::pointer& __parent,
const _Key& __v);
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
@@ -1410,8 +1411,8 @@ __tree<_Tp, _Compare, _Allocator>::clear()
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node::base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_low(typename __node::base::pointer& __parent,
typename __tree<_Tp, _Compare, _Allocator>::__node_base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_low(typename __node_base::pointer& __parent,
const value_type& __v)
{
__node_pointer __nd = __root();
@@ -1449,8 +1450,8 @@ __tree<_Tp, _Compare, _Allocator>::__find_leaf_low(typename __node::base::pointe
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node::base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_high(typename __node::base::pointer& __parent,
typename __tree<_Tp, _Compare, _Allocator>::__node_base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf_high(typename __node_base::pointer& __parent,
const value_type& __v)
{
__node_pointer __nd = __root();
@@ -1491,9 +1492,9 @@ __tree<_Tp, _Compare, _Allocator>::__find_leaf_high(typename __node::base::point
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
typename __tree<_Tp, _Compare, _Allocator>::__node::base::pointer&
typename __tree<_Tp, _Compare, _Allocator>::__node_base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_leaf(const_iterator __hint,
typename __node::base::pointer& __parent,
typename __node_base::pointer& __parent,
const value_type& __v)
{
if (__hint == end() || !value_comp()(*__hint, __v)) // check before
@@ -1527,8 +1528,8 @@ __tree<_Tp, _Compare, _Allocator>::__find_leaf(const_iterator __hint,
// If __v exists, set parent to node of __v and return reference to node of __v
template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::__node::base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_equal(typename __node::base::pointer& __parent,
typename __tree<_Tp, _Compare, _Allocator>::__node_base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_equal(typename __node_base::pointer& __parent,
const _Key& __v)
{
__node_pointer __nd = __root();
@@ -1576,9 +1577,9 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(typename __node::base::pointer&
// If __v exists, set parent to node of __v and return reference to node of __v
template <class _Tp, class _Compare, class _Allocator>
template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::__node::base::pointer&
typename __tree<_Tp, _Compare, _Allocator>::__node_base::pointer&
__tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint,
typename __node::base::pointer& __parent,
typename __node_base::pointer& __parent,
const _Key& __v)
{
if (__hint == end() || value_comp()(__v, *__hint)) // check before

View File

@@ -1276,7 +1276,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Y> const& __p)
template <class _CharT, class _Traits, size_t _Size>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, bitset<_Size>& __x)
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
{
return __os << __x.template to_string<_CharT, _Traits>
(use_facet<ctype<_CharT> >(__os.getloc()).widen('0'),

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

@@ -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

@@ -0,0 +1,25 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <map>
// class map
// map();
#include <map>
struct X
{
std::multimap<int, X> m;
};
int main()
{
}