| Age | Commit message (Collapse) | Author |
|
The previous implementation of the ctype functions assumed ASCII.
This patch changes to a switch/case implementation that looks odd, but
actually is easier for the compiler to understand and optimize.
|
|
|
|
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
|
|
This part of the effort to make all test related pieces into the `test`
directory. This helps is excluding test related pieces in a straight
forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move
the MPFR wrapper and testutils into the 'test' directory.
|
|
The scanf implementation needs a dynamically resizing string class. This
patch adds a minimal version of that class along with tests to check the
current functionality.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D141162
|
|
|
|
This reverts commit df99774ef7d9c910941fe915689f9126258800ee.
|
|
|
|
This reverts commit 522d29a6a745e38d635739b05383770804bac311.
|
|
|
|
This reverts commit 187099da1c415bd8f717eb5adc75bb1d73c7a0ba.
|
|
|
|
This reverts commit abe0fa6b17d866ef21e7c2abb799658c490b8508.
|
|
|
|
|
|
Reviewed By: jeffbailey
Differential Revision: https://reviews.llvm.org/D130112
|
|
The API in StringView.h for remove_prefix was incorrect and was returning a
new StringView rather than just altering the view.
As part of this, also removed some of the safety features. The comment
correctly 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 some
comments.
Tested:
check-libc
llvmlibc
libc-loader-tests
Reviewed By: gchatelet
Differential Revision: https://reviews.llvm.org/D129950
|
|
Add support for three more string_view functions
1) 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: gchatelet
Differential Revision: https://reviews.llvm.org/D129618
|
|
Differential Revision: https://reviews.llvm.org/D128908
|
|
Add support for getenv as defined by the Open Group's "System Interface &
Header" in https://pubs.opengroup.org/onlinepubs/7908799/xsh/getenv.html
getenv 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 <jeffbailey@google.com>
Reviewed By: sivachandra, rtenneti
Differential Revision: https://reviews.llvm.org/D119403
|
|
|