1*58b9f456SAndroid Build Coastguard Worker// -*- C++ -*- 2*58b9f456SAndroid Build Coastguard Worker//===--------------------------- __debug ----------------------------------===// 3*58b9f456SAndroid Build Coastguard Worker// 4*58b9f456SAndroid Build Coastguard Worker// The LLVM Compiler Infrastructure 5*58b9f456SAndroid Build Coastguard Worker// 6*58b9f456SAndroid Build Coastguard Worker// This file is dual licensed under the MIT and the University of Illinois Open 7*58b9f456SAndroid Build Coastguard Worker// Source Licenses. See LICENSE.TXT for details. 8*58b9f456SAndroid Build Coastguard Worker// 9*58b9f456SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 10*58b9f456SAndroid Build Coastguard Worker 11*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_DEBUG_H 12*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_DEBUG_H 13*58b9f456SAndroid Build Coastguard Worker 14*58b9f456SAndroid Build Coastguard Worker#include <__config> 15*58b9f456SAndroid Build Coastguard Worker 16*58b9f456SAndroid Build Coastguard Worker#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 17*58b9f456SAndroid Build Coastguard Worker#pragma GCC system_header 18*58b9f456SAndroid Build Coastguard Worker#endif 19*58b9f456SAndroid Build Coastguard Worker 20*58b9f456SAndroid Build Coastguard Worker#if defined(_LIBCPP_HAS_NO_NULLPTR) 21*58b9f456SAndroid Build Coastguard Worker# include <cstddef> 22*58b9f456SAndroid Build Coastguard Worker#endif 23*58b9f456SAndroid Build Coastguard Worker 24*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY) 25*58b9f456SAndroid Build Coastguard Worker# include <cstdlib> 26*58b9f456SAndroid Build Coastguard Worker# include <cstdio> 27*58b9f456SAndroid Build Coastguard Worker# include <cstddef> 28*58b9f456SAndroid Build Coastguard Worker# include <exception> 29*58b9f456SAndroid Build Coastguard Worker#endif 30*58b9f456SAndroid Build Coastguard Worker 31*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 1 && !defined(_LIBCPP_ASSERT) 32*58b9f456SAndroid Build Coastguard Worker# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : \ 33*58b9f456SAndroid Build Coastguard Worker _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) 34*58b9f456SAndroid Build Coastguard Worker#endif 35*58b9f456SAndroid Build Coastguard Worker 36*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 2 37*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_DEBUG_ASSERT 38*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(x, m) 39*58b9f456SAndroid Build Coastguard Worker#endif 40*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_DEBUG_MODE(...) __VA_ARGS__ 41*58b9f456SAndroid Build Coastguard Worker#endif 42*58b9f456SAndroid Build Coastguard Worker 43*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_ASSERT 44*58b9f456SAndroid Build Coastguard Worker# define _LIBCPP_ASSERT(x, m) ((void)0) 45*58b9f456SAndroid Build Coastguard Worker#endif 46*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_DEBUG_ASSERT 47*58b9f456SAndroid Build Coastguard Worker# define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0) 48*58b9f456SAndroid Build Coastguard Worker#endif 49*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_DEBUG_MODE 50*58b9f456SAndroid Build Coastguard Worker#define _LIBCPP_DEBUG_MODE(...) ((void)0) 51*58b9f456SAndroid Build Coastguard Worker#endif 52*58b9f456SAndroid Build Coastguard Worker 53*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL < 1 54*58b9f456SAndroid Build Coastguard Workerclass _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception; 55*58b9f456SAndroid Build Coastguard Worker#endif 56*58b9f456SAndroid Build Coastguard Worker 57*58b9f456SAndroid Build Coastguard Worker_LIBCPP_BEGIN_NAMESPACE_STD 58*58b9f456SAndroid Build Coastguard Worker 59*58b9f456SAndroid Build Coastguard Workerstruct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info { 60*58b9f456SAndroid Build Coastguard Worker _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR 61*58b9f456SAndroid Build Coastguard Worker __libcpp_debug_info() 62*58b9f456SAndroid Build Coastguard Worker : __file_(nullptr), __line_(-1), __pred_(nullptr), __msg_(nullptr) {} 63*58b9f456SAndroid Build Coastguard Worker _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR 64*58b9f456SAndroid Build Coastguard Worker __libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m) 65*58b9f456SAndroid Build Coastguard Worker : __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {} 66*58b9f456SAndroid Build Coastguard Worker const char* __file_; 67*58b9f456SAndroid Build Coastguard Worker int __line_; 68*58b9f456SAndroid Build Coastguard Worker const char* __pred_; 69*58b9f456SAndroid Build Coastguard Worker const char* __msg_; 70*58b9f456SAndroid Build Coastguard Worker}; 71*58b9f456SAndroid Build Coastguard Worker 72*58b9f456SAndroid Build Coastguard Worker/// __libcpp_debug_function_type - The type of the assertion failure handler. 73*58b9f456SAndroid Build Coastguard Workertypedef void(*__libcpp_debug_function_type)(__libcpp_debug_info const&); 74*58b9f456SAndroid Build Coastguard Worker 75*58b9f456SAndroid Build Coastguard Worker/// __libcpp_debug_function - The handler function called when a _LIBCPP_ASSERT 76*58b9f456SAndroid Build Coastguard Worker/// fails. 77*58b9f456SAndroid Build Coastguard Workerextern _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_function_type __libcpp_debug_function; 78*58b9f456SAndroid Build Coastguard Worker 79*58b9f456SAndroid Build Coastguard Worker/// __libcpp_abort_debug_function - A debug handler that aborts when called. 80*58b9f456SAndroid Build Coastguard Worker_LIBCPP_NORETURN _LIBCPP_FUNC_VIS 81*58b9f456SAndroid Build Coastguard Workervoid __libcpp_abort_debug_function(__libcpp_debug_info const&); 82*58b9f456SAndroid Build Coastguard Worker 83*58b9f456SAndroid Build Coastguard Worker/// __libcpp_throw_debug_function - A debug handler that throws 84*58b9f456SAndroid Build Coastguard Worker/// an instance of __libcpp_debug_exception when called. 85*58b9f456SAndroid Build Coastguard Worker _LIBCPP_NORETURN _LIBCPP_FUNC_VIS 86*58b9f456SAndroid Build Coastguard Workervoid __libcpp_throw_debug_function(__libcpp_debug_info const&); 87*58b9f456SAndroid Build Coastguard Worker 88*58b9f456SAndroid Build Coastguard Worker/// __libcpp_set_debug_function - Set the debug handler to the specified 89*58b9f456SAndroid Build Coastguard Worker/// function. 90*58b9f456SAndroid Build Coastguard Worker_LIBCPP_FUNC_VIS 91*58b9f456SAndroid Build Coastguard Workerbool __libcpp_set_debug_function(__libcpp_debug_function_type __func); 92*58b9f456SAndroid Build Coastguard Worker 93*58b9f456SAndroid Build Coastguard Worker// Setup the throwing debug handler during dynamic initialization. 94*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 1 && defined(_LIBCPP_DEBUG_USE_EXCEPTIONS) 95*58b9f456SAndroid Build Coastguard Worker# if defined(_LIBCPP_NO_EXCEPTIONS) 96*58b9f456SAndroid Build Coastguard Worker# error _LIBCPP_DEBUG_USE_EXCEPTIONS cannot be used when exceptions are disabled. 97*58b9f456SAndroid Build Coastguard Worker# endif 98*58b9f456SAndroid Build Coastguard Workerstatic bool __init_dummy = __libcpp_set_debug_function(__libcpp_throw_debug_function); 99*58b9f456SAndroid Build Coastguard Worker#endif 100*58b9f456SAndroid Build Coastguard Worker 101*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY) 102*58b9f456SAndroid Build Coastguard Workerclass _LIBCPP_EXCEPTION_ABI __libcpp_debug_exception : public exception { 103*58b9f456SAndroid Build Coastguard Workerpublic: 104*58b9f456SAndroid Build Coastguard Worker __libcpp_debug_exception() _NOEXCEPT; 105*58b9f456SAndroid Build Coastguard Worker explicit __libcpp_debug_exception(__libcpp_debug_info const& __i); 106*58b9f456SAndroid Build Coastguard Worker __libcpp_debug_exception(__libcpp_debug_exception const&); 107*58b9f456SAndroid Build Coastguard Worker ~__libcpp_debug_exception() _NOEXCEPT; 108*58b9f456SAndroid Build Coastguard Worker const char* what() const _NOEXCEPT; 109*58b9f456SAndroid Build Coastguard Workerprivate: 110*58b9f456SAndroid Build Coastguard Worker struct __libcpp_debug_exception_imp; 111*58b9f456SAndroid Build Coastguard Worker __libcpp_debug_exception_imp *__imp_; 112*58b9f456SAndroid Build Coastguard Worker}; 113*58b9f456SAndroid Build Coastguard Worker#endif 114*58b9f456SAndroid Build Coastguard Worker 115*58b9f456SAndroid Build Coastguard Worker#if _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY) 116*58b9f456SAndroid Build Coastguard Worker 117*58b9f456SAndroid Build Coastguard Workerstruct _LIBCPP_TYPE_VIS __c_node; 118*58b9f456SAndroid Build Coastguard Worker 119*58b9f456SAndroid Build Coastguard Workerstruct _LIBCPP_TYPE_VIS __i_node 120*58b9f456SAndroid Build Coastguard Worker{ 121*58b9f456SAndroid Build Coastguard Worker void* __i_; 122*58b9f456SAndroid Build Coastguard Worker __i_node* __next_; 123*58b9f456SAndroid Build Coastguard Worker __c_node* __c_; 124*58b9f456SAndroid Build Coastguard Worker 125*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_CXX03_LANG 126*58b9f456SAndroid Build Coastguard Worker __i_node(const __i_node&) = delete; 127*58b9f456SAndroid Build Coastguard Worker __i_node& operator=(const __i_node&) = delete; 128*58b9f456SAndroid Build Coastguard Worker#else 129*58b9f456SAndroid Build Coastguard Workerprivate: 130*58b9f456SAndroid Build Coastguard Worker __i_node(const __i_node&); 131*58b9f456SAndroid Build Coastguard Worker __i_node& operator=(const __i_node&); 132*58b9f456SAndroid Build Coastguard Workerpublic: 133*58b9f456SAndroid Build Coastguard Worker#endif 134*58b9f456SAndroid Build Coastguard Worker _LIBCPP_INLINE_VISIBILITY 135*58b9f456SAndroid Build Coastguard Worker __i_node(void* __i, __i_node* __next, __c_node* __c) 136*58b9f456SAndroid Build Coastguard Worker : __i_(__i), __next_(__next), __c_(__c) {} 137*58b9f456SAndroid Build Coastguard Worker ~__i_node(); 138*58b9f456SAndroid Build Coastguard Worker}; 139*58b9f456SAndroid Build Coastguard Worker 140*58b9f456SAndroid Build Coastguard Workerstruct _LIBCPP_TYPE_VIS __c_node 141*58b9f456SAndroid Build Coastguard Worker{ 142*58b9f456SAndroid Build Coastguard Worker void* __c_; 143*58b9f456SAndroid Build Coastguard Worker __c_node* __next_; 144*58b9f456SAndroid Build Coastguard Worker __i_node** beg_; 145*58b9f456SAndroid Build Coastguard Worker __i_node** end_; 146*58b9f456SAndroid Build Coastguard Worker __i_node** cap_; 147*58b9f456SAndroid Build Coastguard Worker 148*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_CXX03_LANG 149*58b9f456SAndroid Build Coastguard Worker __c_node(const __c_node&) = delete; 150*58b9f456SAndroid Build Coastguard Worker __c_node& operator=(const __c_node&) = delete; 151*58b9f456SAndroid Build Coastguard Worker#else 152*58b9f456SAndroid Build Coastguard Workerprivate: 153*58b9f456SAndroid Build Coastguard Worker __c_node(const __c_node&); 154*58b9f456SAndroid Build Coastguard Worker __c_node& operator=(const __c_node&); 155*58b9f456SAndroid Build Coastguard Workerpublic: 156*58b9f456SAndroid Build Coastguard Worker#endif 157*58b9f456SAndroid Build Coastguard Worker _LIBCPP_INLINE_VISIBILITY 158*58b9f456SAndroid Build Coastguard Worker __c_node(void* __c, __c_node* __next) 159*58b9f456SAndroid Build Coastguard Worker : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {} 160*58b9f456SAndroid Build Coastguard Worker virtual ~__c_node(); 161*58b9f456SAndroid Build Coastguard Worker 162*58b9f456SAndroid Build Coastguard Worker virtual bool __dereferenceable(const void*) const = 0; 163*58b9f456SAndroid Build Coastguard Worker virtual bool __decrementable(const void*) const = 0; 164*58b9f456SAndroid Build Coastguard Worker virtual bool __addable(const void*, ptrdiff_t) const = 0; 165*58b9f456SAndroid Build Coastguard Worker virtual bool __subscriptable(const void*, ptrdiff_t) const = 0; 166*58b9f456SAndroid Build Coastguard Worker 167*58b9f456SAndroid Build Coastguard Worker void __add(__i_node* __i); 168*58b9f456SAndroid Build Coastguard Worker _LIBCPP_HIDDEN void __remove(__i_node* __i); 169*58b9f456SAndroid Build Coastguard Worker}; 170*58b9f456SAndroid Build Coastguard Worker 171*58b9f456SAndroid Build Coastguard Workertemplate <class _Cont> 172*58b9f456SAndroid Build Coastguard Workerstruct _C_node 173*58b9f456SAndroid Build Coastguard Worker : public __c_node 174*58b9f456SAndroid Build Coastguard Worker{ 175*58b9f456SAndroid Build Coastguard Worker _C_node(void* __c, __c_node* __n) 176*58b9f456SAndroid Build Coastguard Worker : __c_node(__c, __n) {} 177*58b9f456SAndroid Build Coastguard Worker 178*58b9f456SAndroid Build Coastguard Worker virtual bool __dereferenceable(const void*) const; 179*58b9f456SAndroid Build Coastguard Worker virtual bool __decrementable(const void*) const; 180*58b9f456SAndroid Build Coastguard Worker virtual bool __addable(const void*, ptrdiff_t) const; 181*58b9f456SAndroid Build Coastguard Worker virtual bool __subscriptable(const void*, ptrdiff_t) const; 182*58b9f456SAndroid Build Coastguard Worker}; 183*58b9f456SAndroid Build Coastguard Worker 184*58b9f456SAndroid Build Coastguard Workertemplate <class _Cont> 185*58b9f456SAndroid Build Coastguard Workerinline bool 186*58b9f456SAndroid Build Coastguard Worker_C_node<_Cont>::__dereferenceable(const void* __i) const 187*58b9f456SAndroid Build Coastguard Worker{ 188*58b9f456SAndroid Build Coastguard Worker typedef typename _Cont::const_iterator iterator; 189*58b9f456SAndroid Build Coastguard Worker const iterator* __j = static_cast<const iterator*>(__i); 190*58b9f456SAndroid Build Coastguard Worker _Cont* _Cp = static_cast<_Cont*>(__c_); 191*58b9f456SAndroid Build Coastguard Worker return _Cp->__dereferenceable(__j); 192*58b9f456SAndroid Build Coastguard Worker} 193*58b9f456SAndroid Build Coastguard Worker 194*58b9f456SAndroid Build Coastguard Workertemplate <class _Cont> 195*58b9f456SAndroid Build Coastguard Workerinline bool 196*58b9f456SAndroid Build Coastguard Worker_C_node<_Cont>::__decrementable(const void* __i) const 197*58b9f456SAndroid Build Coastguard Worker{ 198*58b9f456SAndroid Build Coastguard Worker typedef typename _Cont::const_iterator iterator; 199*58b9f456SAndroid Build Coastguard Worker const iterator* __j = static_cast<const iterator*>(__i); 200*58b9f456SAndroid Build Coastguard Worker _Cont* _Cp = static_cast<_Cont*>(__c_); 201*58b9f456SAndroid Build Coastguard Worker return _Cp->__decrementable(__j); 202*58b9f456SAndroid Build Coastguard Worker} 203*58b9f456SAndroid Build Coastguard Worker 204*58b9f456SAndroid Build Coastguard Workertemplate <class _Cont> 205*58b9f456SAndroid Build Coastguard Workerinline bool 206*58b9f456SAndroid Build Coastguard Worker_C_node<_Cont>::__addable(const void* __i, ptrdiff_t __n) const 207*58b9f456SAndroid Build Coastguard Worker{ 208*58b9f456SAndroid Build Coastguard Worker typedef typename _Cont::const_iterator iterator; 209*58b9f456SAndroid Build Coastguard Worker const iterator* __j = static_cast<const iterator*>(__i); 210*58b9f456SAndroid Build Coastguard Worker _Cont* _Cp = static_cast<_Cont*>(__c_); 211*58b9f456SAndroid Build Coastguard Worker return _Cp->__addable(__j, __n); 212*58b9f456SAndroid Build Coastguard Worker} 213*58b9f456SAndroid Build Coastguard Worker 214*58b9f456SAndroid Build Coastguard Workertemplate <class _Cont> 215*58b9f456SAndroid Build Coastguard Workerinline bool 216*58b9f456SAndroid Build Coastguard Worker_C_node<_Cont>::__subscriptable(const void* __i, ptrdiff_t __n) const 217*58b9f456SAndroid Build Coastguard Worker{ 218*58b9f456SAndroid Build Coastguard Worker typedef typename _Cont::const_iterator iterator; 219*58b9f456SAndroid Build Coastguard Worker const iterator* __j = static_cast<const iterator*>(__i); 220*58b9f456SAndroid Build Coastguard Worker _Cont* _Cp = static_cast<_Cont*>(__c_); 221*58b9f456SAndroid Build Coastguard Worker return _Cp->__subscriptable(__j, __n); 222*58b9f456SAndroid Build Coastguard Worker} 223*58b9f456SAndroid Build Coastguard Worker 224*58b9f456SAndroid Build Coastguard Workerclass _LIBCPP_TYPE_VIS __libcpp_db 225*58b9f456SAndroid Build Coastguard Worker{ 226*58b9f456SAndroid Build Coastguard Worker __c_node** __cbeg_; 227*58b9f456SAndroid Build Coastguard Worker __c_node** __cend_; 228*58b9f456SAndroid Build Coastguard Worker size_t __csz_; 229*58b9f456SAndroid Build Coastguard Worker __i_node** __ibeg_; 230*58b9f456SAndroid Build Coastguard Worker __i_node** __iend_; 231*58b9f456SAndroid Build Coastguard Worker size_t __isz_; 232*58b9f456SAndroid Build Coastguard Worker 233*58b9f456SAndroid Build Coastguard Worker __libcpp_db(); 234*58b9f456SAndroid Build Coastguard Workerpublic: 235*58b9f456SAndroid Build Coastguard Worker#ifndef _LIBCPP_CXX03_LANG 236*58b9f456SAndroid Build Coastguard Worker __libcpp_db(const __libcpp_db&) = delete; 237*58b9f456SAndroid Build Coastguard Worker __libcpp_db& operator=(const __libcpp_db&) = delete; 238*58b9f456SAndroid Build Coastguard Worker#else 239*58b9f456SAndroid Build Coastguard Workerprivate: 240*58b9f456SAndroid Build Coastguard Worker __libcpp_db(const __libcpp_db&); 241*58b9f456SAndroid Build Coastguard Worker __libcpp_db& operator=(const __libcpp_db&); 242*58b9f456SAndroid Build Coastguard Workerpublic: 243*58b9f456SAndroid Build Coastguard Worker#endif 244*58b9f456SAndroid Build Coastguard Worker ~__libcpp_db(); 245*58b9f456SAndroid Build Coastguard Worker 246*58b9f456SAndroid Build Coastguard Worker class __db_c_iterator; 247*58b9f456SAndroid Build Coastguard Worker class __db_c_const_iterator; 248*58b9f456SAndroid Build Coastguard Worker class __db_i_iterator; 249*58b9f456SAndroid Build Coastguard Worker class __db_i_const_iterator; 250*58b9f456SAndroid Build Coastguard Worker 251*58b9f456SAndroid Build Coastguard Worker __db_c_const_iterator __c_end() const; 252*58b9f456SAndroid Build Coastguard Worker __db_i_const_iterator __i_end() const; 253*58b9f456SAndroid Build Coastguard Worker 254*58b9f456SAndroid Build Coastguard Worker template <class _Cont> 255*58b9f456SAndroid Build Coastguard Worker _LIBCPP_INLINE_VISIBILITY 256*58b9f456SAndroid Build Coastguard Worker void __insert_c(_Cont* __c) 257*58b9f456SAndroid Build Coastguard Worker { 258*58b9f456SAndroid Build Coastguard Worker __c_node* __n = __insert_c(static_cast<void*>(__c)); 259*58b9f456SAndroid Build Coastguard Worker ::new(__n) _C_node<_Cont>(__n->__c_, __n->__next_); 260*58b9f456SAndroid Build Coastguard Worker } 261*58b9f456SAndroid Build Coastguard Worker 262*58b9f456SAndroid Build Coastguard Worker void __insert_i(void* __i); 263*58b9f456SAndroid Build Coastguard Worker __c_node* __insert_c(void* __c); 264*58b9f456SAndroid Build Coastguard Worker void __erase_c(void* __c); 265*58b9f456SAndroid Build Coastguard Worker 266*58b9f456SAndroid Build Coastguard Worker void __insert_ic(void* __i, const void* __c); 267*58b9f456SAndroid Build Coastguard Worker void __iterator_copy(void* __i, const void* __i0); 268*58b9f456SAndroid Build Coastguard Worker void __erase_i(void* __i); 269*58b9f456SAndroid Build Coastguard Worker 270*58b9f456SAndroid Build Coastguard Worker void* __find_c_from_i(void* __i) const; 271*58b9f456SAndroid Build Coastguard Worker void __invalidate_all(void* __c); 272*58b9f456SAndroid Build Coastguard Worker __c_node* __find_c_and_lock(void* __c) const; 273*58b9f456SAndroid Build Coastguard Worker __c_node* __find_c(void* __c) const; 274*58b9f456SAndroid Build Coastguard Worker void unlock() const; 275*58b9f456SAndroid Build Coastguard Worker 276*58b9f456SAndroid Build Coastguard Worker void swap(void* __c1, void* __c2); 277*58b9f456SAndroid Build Coastguard Worker 278*58b9f456SAndroid Build Coastguard Worker 279*58b9f456SAndroid Build Coastguard Worker bool __dereferenceable(const void* __i) const; 280*58b9f456SAndroid Build Coastguard Worker bool __decrementable(const void* __i) const; 281*58b9f456SAndroid Build Coastguard Worker bool __addable(const void* __i, ptrdiff_t __n) const; 282*58b9f456SAndroid Build Coastguard Worker bool __subscriptable(const void* __i, ptrdiff_t __n) const; 283*58b9f456SAndroid Build Coastguard Worker bool __less_than_comparable(const void* __i, const void* __j) const; 284*58b9f456SAndroid Build Coastguard Workerprivate: 285*58b9f456SAndroid Build Coastguard Worker _LIBCPP_HIDDEN 286*58b9f456SAndroid Build Coastguard Worker __i_node* __insert_iterator(void* __i); 287*58b9f456SAndroid Build Coastguard Worker _LIBCPP_HIDDEN 288*58b9f456SAndroid Build Coastguard Worker __i_node* __find_iterator(const void* __i) const; 289*58b9f456SAndroid Build Coastguard Worker 290*58b9f456SAndroid Build Coastguard Worker friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db(); 291*58b9f456SAndroid Build Coastguard Worker}; 292*58b9f456SAndroid Build Coastguard Worker 293*58b9f456SAndroid Build Coastguard Worker_LIBCPP_FUNC_VIS __libcpp_db* __get_db(); 294*58b9f456SAndroid Build Coastguard Worker_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db(); 295*58b9f456SAndroid Build Coastguard Worker 296*58b9f456SAndroid Build Coastguard Worker 297*58b9f456SAndroid Build Coastguard Worker#endif // _LIBCPP_DEBUG_LEVEL >= 2 || defined(_LIBCPP_BUILDING_LIBRARY) 298*58b9f456SAndroid Build Coastguard Worker 299*58b9f456SAndroid Build Coastguard Worker_LIBCPP_END_NAMESPACE_STD 300*58b9f456SAndroid Build Coastguard Worker 301*58b9f456SAndroid Build Coastguard Worker#endif // _LIBCPP_DEBUG_H 302*58b9f456SAndroid Build Coastguard Worker 303