diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-08-23 17:37:05 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-08-23 17:37:05 +0000 |
commit | fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d (patch) | |
tree | ae37b542af4ad74ab85bfa5650101b0e2ece2e1a /libcxx/include/__debug | |
parent | 9217aa3b1532b76e50c6e28f4baec28557f5f978 (diff) | |
download | bcm5719-llvm-fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d.tar.gz bcm5719-llvm-fc88dbd2988365dfa869d7387e1c1a1ae1e5d33d.zip |
Debug mode for string. This commit also marks the first time libc++ debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
llvm-svn: 189114
Diffstat (limited to 'libcxx/include/__debug')
-rw-r--r-- | libcxx/include/__debug | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libcxx/include/__debug b/libcxx/include/__debug index bac580cfa80..f1805adcfe4 100644 --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -11,6 +11,10 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + #if _LIBCPP_DEBUG_LEVEL >= 1 # include <cstdlib> @@ -24,10 +28,6 @@ #if _LIBCPP_DEBUG_LEVEL >= 2 -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - _LIBCPP_BEGIN_NAMESPACE_STD struct _LIBCPP_TYPE_VIS __c_node; @@ -38,8 +38,15 @@ struct _LIBCPP_TYPE_VIS __i_node __i_node* __next_; __c_node* __c_; +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __i_node(const __i_node&) = delete; __i_node& operator=(const __i_node&) = delete; +#else +private: + __i_node(const __i_node&); + __i_node& operator=(const __i_node&); +public: +#endif _LIBCPP_INLINE_VISIBILITY __i_node(void* __i, __i_node* __next, __c_node* __c) : __i_(__i), __next_(__next), __c_(__c) {} @@ -54,8 +61,15 @@ struct _LIBCPP_TYPE_VIS __c_node __i_node** end_; __i_node** cap_; +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __c_node(const __c_node&) = delete; __c_node& operator=(const __c_node&) = delete; +#else +private: + __c_node(const __c_node&); + __c_node& operator=(const __c_node&); +public: +#endif _LIBCPP_INLINE_VISIBILITY __c_node(void* __c, __c_node* __next) : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {} @@ -134,8 +148,15 @@ class _LIBCPP_TYPE_VIS __libcpp_db __libcpp_db(); public: +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS __libcpp_db(const __libcpp_db&) = delete; __libcpp_db& operator=(const __libcpp_db&) = delete; +#else +private: + __libcpp_db(const __libcpp_db&); + __libcpp_db& operator=(const __libcpp_db&); +public: +#endif ~__libcpp_db(); class __db_c_iterator; |