gcc/libstdc++-v3/include/ext
Jonathan Wakely c9ca352186 libstdc++: Use __builtin_operator_new when available [PR94295]
Clang provides __builtin_operator_new and __builtin_operator_delete,
which have the same semantics as ::operator new and ::operator delete
except that the compiler is allowed to elide calls to them. This changes
std::allocator to use those built-in functions so that memory allocated
by std::allocator can be optimized away when using Clang. This avoids an
abstraction penalty for using std::allocator to allocate storage rather
than a new-expression.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	PR libstdc++/94295
	* include/ext/new_allocator.h (_GLIBCXX_OPERATOR_NEW)
	(_GLIBCXX_OPERATOR_DELETE, _GLIBCXX_SIZED_DEALLOC): Define.
	(allocator::allocate, allocator::deallocate): Use new macros.
2021-07-22 14:38:34 +01:00
..
pb_ds
algorithm
aligned_buffer.h
alloc_traits.h
atomicity.h
bitmap_allocator.h
cast.h
cmath
codecvt_specializations.h
concurrence.h
debug_allocator.h
enc_filebuf.h
extptr_allocator.h
functional
iterator
malloc_allocator.h
memory
mt_allocator.h
new_allocator.h libstdc++: Use __builtin_operator_new when available [PR94295] 2021-07-22 14:38:34 +01:00
numeric
numeric_traits.h
pod_char_traits.h
pointer.h
pool_allocator.h
random
random.tcc
rb_tree
rc_string_base.h
rope libstdc++: Make __gnu_cxx::sequence_buffer move-aware [PR101542] 2021-07-21 17:20:37 +01:00
ropeimpl.h
slist
sso_string_base.h
stdio_filebuf.h
stdio_sync_filebuf.h
string_conversions.h
throw_allocator.h
type_traits.h
typelist.h
vstring_fwd.h
vstring_util.h
vstring.h
vstring.tcc