llvm-project/libcxx/include
Eric Fiselier ef915d3ef4 Improve performance of constructing filesystem::path from strings.
This patch fixes a performance bug when constructing or appending to a path
from a string or c-string. Previously we called 'push_back' to append every
single character. This caused multiple re-allocation and copies when at most
one reallocation is necessary. The new behavior is to simply call
`string::append` so it can correctly handle reallocation.

For large strings this change is a ~4x improvement. This also makes our path
faster to construct than libstdc++'s.

llvm-svn: 285530
2016-10-30 23:53:50 +00:00
..
experimental Improve performance of constructing filesystem::path from strings. 2016-10-30 23:53:50 +00:00
ext Cleanup: move visibility/linkage attributes to the first declaration. 2016-04-22 01:04:55 +00:00
support [libc++] Add missing locale aliases 2016-09-29 03:35:41 +00:00
CMakeLists.txt [CMake] NFC. Fixing spelling from r280400 2016-09-01 19:46:02 +00:00
__bit_reference Get tests running with warnings. Fix warnings in headers and tests 2015-02-05 20:28:37 +00:00
__bsd_locale_defaults.h Reorganize _LIBCPP_LOCALE__L_EXTENSIONS 2016-03-09 15:39:39 +00:00
__bsd_locale_fallbacks.h Reorganize _LIBCPP_LOCALE__L_EXTENSIONS 2016-03-09 15:39:39 +00:00
__config Revert addition of __libcpp_library_version 2016-10-28 22:37:24 +00:00
__config_site.in Expect DLL builds on Windows by default and require a custom __config for static 2016-09-26 22:19:41 +00:00
__debug Fix undefined behavior in __hash_table 2016-07-23 20:36:55 +00:00
__functional_03 Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
__functional_base Add missing _v traits. is_bind_expression_v, is_placeholder_v and uses_allocator_v 2016-09-22 00:23:15 +00:00
__functional_base_03 [libcxx] Rewrite C++03 __invoke. 2015-08-26 20:15:02 +00:00
__hash_table Fix missing _LIBCPP_INLINE_VISIBILITY macro on C++03 specific __hash_table function 2016-09-25 04:05:46 +00:00
__libcpp_version Add __libcpp_version file and __libcpp_library_version function. 2016-10-28 06:06:50 +00:00
__locale [libc++] Fix and document visibility attributes for Clang, GCC and Windows. 2016-09-15 22:27:07 +00:00
__mutex_base Don't use pthread initializers in constexpr constructors. Patch by elram. Reviewed at https://reviews.llvm.org/D21637. 2016-07-18 17:23:06 +00:00
__nullptr Fix nullptr tests 2016-10-25 20:45:17 +00:00
__refstring [libc++] Fix modules build - Rework __refstring definition 2016-10-25 19:33:14 +00:00
__split_buffer Cleanup: move visibility/linkage attributes to the first declaration. 2015-11-07 01:22:13 +00:00
__sso_allocator Handle function name conflicts in _LIBCPP_MSVCRT mode 2015-02-13 22:15:32 +00:00
__std_stream Enable and fix warnings during the build. 2015-07-18 20:40:46 +00:00
__string [libc++] Fix and document visibility attributes for Clang, GCC and Windows. 2016-09-15 22:27:07 +00:00
__threading_support [libcxx] Improve the gcc workaround for the missing __has_include macro. 2016-10-14 13:56:58 +00:00
__tree Avoid embedded preprocessor directives in __tree 2016-08-27 19:32:03 +00:00
__tuple Fix or suppress GCC warnings during build. 2016-08-29 20:43:38 +00:00
__undef___deallocate Add option to disable __deallocate #warning 2016-07-12 14:39:13 +00:00
__undef_min_max Add option to disable __deallocate #warning 2016-07-12 14:39:13 +00:00
algorithm Implement C++17 std::sample. 2016-08-28 22:14:37 +00:00
any Make any_cast<void()>(nullptr) compile 2016-10-16 11:56:38 +00:00
array Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
atomic Revert r276506 - Diagnose invalid memory order arguments in <atomic>. 2016-07-23 01:43:53 +00:00
bitset Avoid narrowing warnings in __bitset constructor 2016-09-02 21:02:11 +00:00
cassert
ccomplex
cctype Put back the undefs that Richard removed. Boost won't build w/o these; specifically the file 'bytes_methods.h' in Apple's python framework defines these. 2016-04-04 22:49:20 +00:00
cerrno Split <errno.h> out of <cerrno>. 2015-10-08 20:37:11 +00:00
cfenv Fix incorrect file header. This is <cfenv> not <cctype>. 2015-10-08 21:17:21 +00:00
cfloat Split <float.h> out of <cfloat>. 2015-10-08 20:37:44 +00:00
chrono Last bit of P0006; mark it as complete 2015-11-30 05:39:30 +00:00
cinttypes Split <inttypes.h> out of <cinttypes>. 2015-10-08 20:38:53 +00:00
ciso646
climits
clocale Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
cmath Remove some additional unnecessary std:: in cmath 2016-10-01 20:38:44 +00:00
codecvt
complex Use __builtin_isnan/isinf/isfinite in complex 2016-10-01 20:38:31 +00:00
complex.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
condition_variable Cleanup: move visibility/linkage attributes to the first declaration. 2015-11-07 01:22:13 +00:00
csetjmp Split <setjmp.h> out of <csetjmp>. 2015-10-08 20:41:26 +00:00
csignal
cstdarg
cstdbool
cstddef PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
cstdint
cstdio cstdio: limit gets to CRT versions below 14 2016-09-01 21:09:19 +00:00
cstdlib Fix or suppress GCC warnings during build. 2016-08-29 20:43:38 +00:00
cstring Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
ctgmath
ctime Make support for thread-unsafe C functions optional. 2015-06-24 08:44:38 +00:00
ctype.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
cwchar Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
cwctype Split <wctype.h> out of <cwctype>. 2015-10-09 19:57:37 +00:00
deque Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
errno.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
exception Try 2 - Remove <cstdlib> include from `<exception>` 2016-09-06 21:25:27 +00:00
float.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
forward_list Implement P0084r2. Changing emplace return types. 2016-07-21 03:20:17 +00:00
fstream Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
functional Add void_t and invoke feature test macros 2016-10-14 07:19:52 +00:00
future Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
initializer_list
inttypes.h [include] Declare __STDC_*_MACROS for C++11 compat in old libc 2016-09-26 20:20:00 +00:00
iomanip Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change. 2016-10-27 15:10:07 +00:00
ios Make ios_base::failure visibility specified consistent 2016-04-21 23:00:33 +00:00
iosfwd Make __wrap_iter work with GCC again 2016-02-20 00:19:45 +00:00
iostream Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
istream [libc++] Add _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to support GCC ABI compatibility 2016-09-16 00:00:48 +00:00
iterator Implement constexpr support for reverse_iterator. Reviewed as https://reviews.llvm.org/D25534 2016-10-19 15:12:50 +00:00
limits [WebAssembly] Set std::numeric_limits's traps field for WebAssembly. 2016-01-13 16:32:00 +00:00
limits.h [libcxx] Fix gcc build. 2016-10-10 15:56:01 +00:00
list Fix breakage introduced by adding -Wshadow. 2016-10-23 19:26:39 +00:00
locale [libc++] Fix and document visibility attributes for Clang, GCC and Windows. 2016-09-15 22:27:07 +00:00
map Support allocators with explicit conversion constructors. Fixes bug #29000 2016-08-17 05:58:40 +00:00
math.h [libc++] Remove math_win32.h 2016-09-24 06:27:28 +00:00
memory Fix incorrect exception handling behavior in the uninitialized algorithms 2016-10-11 21:13:44 +00:00
module.modulemap [ModuleMap] Add more module entries to cover some non modular headers 2016-10-21 03:14:27 +00:00
mutex [libcxx] Fix a data race in call_once 2016-09-04 09:55:12 +00:00
new Implement P0035R4 -- Add C++17 aligned allocation functions 2016-10-14 06:46:30 +00:00
numeric Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS. 2016-07-26 14:29:45 +00:00
optional Update status for std::optional LWG issues and fix an optional SFINAE bug 2016-10-16 03:21:35 +00:00
ostream [libc++] Add _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to support GCC ABI compatibility 2016-09-16 00:00:48 +00:00
queue Implement P0084r2. Changing emplace return types. 2016-07-21 03:20:17 +00:00
random Cleanup: move visibility/linkage attributes to the first declaration. 2015-11-07 01:22:13 +00:00
ratio [libc++] Remove various C++03 feature test macros 2016-09-25 03:34:28 +00:00
regex [libcxx] Make regex_match backtrack when search fails 2016-10-27 21:40:34 +00:00
scoped_allocator [libc++] Remove various C++03 feature test macros 2016-09-25 03:34:28 +00:00
set Add static_assert to set/multiset/map/multimap/forward_list/deque that the allocator's value_type match the container's value_type. vector/unordered/list/string already do this. Add tests for all the containers to verify this. 2015-11-26 01:24:04 +00:00
setjmp.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
shared_mutex Qualify calls to addressof to avoid getting ADL. Fixes PR#27254. 2016-04-13 17:02:23 +00:00
sstream Move _LIBCPP_INLINE_VISIBILITY to first declaration in sstream. 2016-09-16 02:09:26 +00:00
stack Implement P0084r2. Changing emplace return types. 2016-07-21 03:20:17 +00:00
stdbool.h Add stdbool.h wrapper for libc++ 2016-02-20 00:16:41 +00:00
stddef.h PR25118: move system_header pragma before uses of include_next to avoid extension warnings for people finding libc++ headers via -I paths. 2015-10-09 00:26:50 +00:00
stdexcept [libc++] Fix modules build - Rework __refstring definition 2016-10-25 19:33:14 +00:00
stdint.h [include] Declare __STDC_*_MACROS for C++11 compat in old libc 2016-09-26 20:20:00 +00:00
stdio.h Split <stdio.h> out of <cstdio>. 2015-10-09 01:29:09 +00:00
stdlib.h Cleanup foo.h headers and __config to work in C 2015-11-06 06:30:12 +00:00
streambuf [libc++] Add _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to support GCC ABI compatibility 2016-09-16 00:00:48 +00:00
string Revert "Added 'inline' attribute to basic_string's destructor" 2016-10-29 00:50:02 +00:00
string.h Instead of asking glibc to provide correct C++ signatures for <string.h> 2016-02-11 23:51:02 +00:00
string_view Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change. 2016-10-27 15:10:07 +00:00
strstream
system_error Implement is_error_code_v and is_error_condition_v for c++17. Rework the tests for is_error_code and is_error_condition, since they were really lacking. Thanks to Alisdair for the heads-up that we were missing these. 2016-09-24 17:36:14 +00:00
tgmath.h
thread [libcxx] Introduce an externally-threaded libc++ variant. 2016-09-11 21:46:40 +00:00
tuple Implement the std::pair parts of "Improving pair and tuple". Completes N4387. 2016-07-25 04:32:07 +00:00
type_traits Add void_t and invoke feature test macros 2016-10-14 07:19:52 +00:00
typeindex
typeinfo Fix strict-aliasing violation in typeinfo::hash_code() 2016-10-05 22:55:10 +00:00
unordered_map [libc++] Fix typos causing compilation errors when _LIBCPP_DEBUG_LEVEL >= 2 2016-09-26 21:39:38 +00:00
unordered_set Cleanup: move visibility/linkage attributes to the first declaration. 2016-04-22 01:04:55 +00:00
utility Update issue status for LWG 2744 2016-10-16 02:51:50 +00:00
valarray Use _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY in valarray to support attribute((internal_linkage)). 2016-09-16 00:13:55 +00:00
vector [libc++] Fix and document visibility attributes for Clang, GCC and Windows. 2016-09-15 22:27:07 +00:00
wchar.h Fix overload sets of strchr, strpbrk, strrchr, memchr and strstr from 2016-02-10 00:59:02 +00:00
wctype.h Split <wctype.h> out of <cwctype>. 2015-10-09 19:57:37 +00:00