[libc] Add a simple StringStream class.This class will be used in future changes to construct simple strings.Reviewed By: michaelrjDifferential Revision: https://reviews.llvm.org/D130334
[libc] Add a method `find_last_of` to StringView.Reviewed By: jeffbaileyDifferential Revision: https://reviews.llvm.org/D130112
[libc] Fix API for remove_{prefix, suffix}The API in StringView.h for remove_prefix was incorrect and was returning anew StringView rather than just altering the view.As part of this, also remov
[libc] Fix API for remove_{prefix, suffix}The API in StringView.h for remove_prefix was incorrect and was returning anew StringView rather than just altering the view.As part of this, also removed some of the safety features. The commentcorrectly noted that the behaviour is undefined in some cases,but the code and test cases checked for that.One caller was relying on the old behaviour, so fixed it and added somecomments.Tested:check-libcllvmlibclibc-loader-testsReviewed By: gchateletDifferential Revision: https://reviews.llvm.org/D129950
show more ...
Add support for three more string_view functionsAdd support for three more string_view functions1) starts_with(char)2) ends_with(char)3) find_first_of(char, size_t)Reimplemented trim in terms
Add support for three more string_view functionsAdd support for three more string_view functions1) starts_with(char)2) ends_with(char)3) find_first_of(char, size_t)Reimplemented trim in terms of the new starts_with and ends_with.Tested:New unit tests.Reviewed By: gchateletDifferential Revision: https://reviews.llvm.org/D129618
[libc][utils] Add more methods to StringViewDifferential Revision: https://reviews.llvm.org/D128908
[libc] Add Uint128 type as a fallback when __uint128_t is not available.Also, the unused specializations of __int128_t have been removed.Differential Revision: https://reviews.llvm.org/D128304
[libc] Support 32-bit ARM platform testsSet LONG_DOUBLE_IS_DOUBLE, add ifdefs for 128-bit integer typesDifferential Revision: https://reviews.llvm.org/D124204
[libc][BlockStore] Add back, pop_back and empty methodsReviewed By: sivachandraDifferential Revision: https://reviews.llvm.org/D121656
[libc][Obvious] Destroy the block store var in block store test.
[libc] Add a resizable container with constexpr constructor and destructor.The new container is used to store atexit callbacks. This way, we avoidthe possibility of the destructor of the container
[libc] Add a resizable container with constexpr constructor and destructor.The new container is used to store atexit callbacks. This way, we avoidthe possibility of the destructor of the container itself getting addedas an at exit callback.Reviewed By: abrachetDifferential Revision: https://reviews.llvm.org/D121350
[libc][NFC] split standalone_cpp into single headersPreviously, the entire support/CPP folder was in one header library,which meant that a lot of headers were included where they shouldn't be.Thi
[libc][NFC] split standalone_cpp into single headersPreviously, the entire support/CPP folder was in one header library,which meant that a lot of headers were included where they shouldn't be.This patch splits each header into its own target, as well as adjustingeach place they were included to only include what is used.Reviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D121237
[libc] Add a class "Atomic" as a simple equivalent of std::atomic.Only the methods currently required by the libc have been added.Most of the existing uses of atomic operations have been switched
[libc] Add a class "Atomic" as a simple equivalent of std::atomic.Only the methods currently required by the libc have been added.Most of the existing uses of atomic operations have been switched overto this new class. A future change will clean up the rest of uses.This change now allows building mutex and condition variable code with aC++ compiler which does not have stdatomic.h, for example g++.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D120642
[libc] Create cpp::IntegerSequence analogous to std::integer_sequenceReviewed By: sivachandra, lntueDifferential Revision: https://reviews.llvm.org/D119511
Introduce getenv to LLVM libcAdd support for getenv as defined by the Open Group's "System Interface & Header" in https://pubs.opengroup.org/onlinepubs/7908799/xsh/getenv.htmlgetenv requires a s
Introduce getenv to LLVM libcAdd support for getenv as defined by the Open Group's "System Interface & Header" in https://pubs.opengroup.org/onlinepubs/7908799/xsh/getenv.htmlgetenv requires a standard way of accessing the environment,so a pointer to the environment is added to the startup in crt1.Consquently, this function is not usable on top of other libcs.Added starts_with method to StringView. getenv function uses it.Co-authored-by: Jeff Bailey <[email protected]>Reviewed By: sivachandra, rtennetiDifferential Revision: https://reviews.llvm.org/D119403
[libc][cpp] Add a constructor to ArrayRef to construct from void * data.Also modified operator[] to return a reference to the array element.Reviewed By: lntueDifferential Revision: https://revi
[libc][cpp] Add a constructor to ArrayRef to construct from void * data.Also modified operator[] to return a reference to the array element.Reviewed By: lntueDifferential Revision: https://reviews.llvm.org/D119725
[libc][Obvious][NFC] Move CPP tests to the correct nested directory.