Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: include/new

Issue 2574553002: [counting-allocator] macOS buildtools/third_party/libc++/trunk/ changes.
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/memory ('k') | include/set » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // -*- C++ -*- 1 // -*- C++ -*-
2 //===----------------------------- new ------------------------------------===// 2 //===----------------------------- new ------------------------------------===//
3 // 3 //
4 // The LLVM Compiler Infrastructure 4 // The LLVM Compiler Infrastructure
5 // 5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open 6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details. 7 // Source Licenses. See LICENSE.TXT for details.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 #endif // defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11) 113 #endif // defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11)
114 114
115 _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec 115 _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec
116 116
117 struct _LIBCPP_TYPE_VIS nothrow_t {}; 117 struct _LIBCPP_TYPE_VIS nothrow_t {};
118 extern _LIBCPP_FUNC_VIS const nothrow_t nothrow; 118 extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
119 typedef void (*new_handler)(); 119 typedef void (*new_handler)();
120 _LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT; 120 _LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
121 _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT; 121 _LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
122 122
123 struct _LIBCPP_TYPE_VIS new_tag { const char* value; };
124
123 } // std 125 } // std
124 126
125 #if defined(_WIN32) && !defined(cxx_EXPORTS) 127 #if defined(_WIN32) && !defined(cxx_EXPORTS)
126 # define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS_ONLY 128 # define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS_ONLY
127 #else 129 #else
128 # define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS 130 # define _LIBCPP_NEW_DELETE_VIS _LIBCPP_FUNC_VIS
129 #endif 131 #endif
130 132
131 _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz) 133 _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz)
132 #if !__has_feature(cxx_noexcept) 134 #if !__has_feature(cxx_noexcept)
133 throw(std::bad_alloc) 135 throw(std::bad_alloc)
134 #endif 136 #endif
135 ; 137 ;
138 _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, std::new_tag __tag)
139 #if !__has_feature(cxx_noexcept)
140 throw(std::bad_alloc)
141 #endif
142 ;
136 _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, const std::nothrow_t &) _NOEXCEPT _NOALIAS; 143 _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, const std::nothrow_t &) _NOEXCEPT _NOALIAS;
137 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p) _NOEXCEPT; 144 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p) _NOEXCEPT;
138 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, const std::nothrow_t&) _ NOEXCEPT; 145 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, const std::nothrow_t&) _ NOEXCEPT;
139 #if defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER >= 14 || \ 146 #if defined(_LIBCPP_BUILDING_NEW) || _LIBCPP_STD_VER >= 14 || \
140 (defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309) 147 (defined(__cpp_sized_deallocation) && __cpp_sized_deallocation >= 201309)
141 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, std::size_t __sz) _NOEXC EPT; 148 _LIBCPP_NEW_DELETE_VIS void operator delete(void* __p, std::size_t __sz) _NOEXC EPT;
142 #endif 149 #endif
143 150
144 _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz) 151 _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz)
145 #if !__has_feature(cxx_noexcept) 152 #if !__has_feature(cxx_noexcept)
(...skipping 27 matching lines...) Expand all
173 #ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE 180 #ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
174 ::operator delete(__ptr); 181 ::operator delete(__ptr);
175 #else 182 #else
176 __builtin_operator_delete(__ptr); 183 __builtin_operator_delete(__ptr);
177 #endif 184 #endif
178 } 185 }
179 186
180 _LIBCPP_END_NAMESPACE_STD 187 _LIBCPP_END_NAMESPACE_STD
181 188
182 #endif // _LIBCPP_NEW 189 #endif // _LIBCPP_NEW
OLDNEW
« no previous file with comments | « include/memory ('k') | include/set » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698