llvm-project/libc
Jeff Bailey 8aad330eeb [libc] Fix API for remove_{prefix, suffix}
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
2022-07-18 14:40:09 +00:00
..
AOR_v20.02 Harmonize Python shebang 2020-07-16 21:53:45 +02:00
benchmarks Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
cmake/modules [libc][NFC] Make all integration tests depend on the threads implementation. 2022-07-13 20:51:12 +00:00
config [libc][arm32] add string stdlib & math entrypoints 2022-07-15 10:10:58 -07:00
docs [libc][docs] Added fmod performance results. 2022-06-27 19:31:54 +02:00
fuzzing [libc][NFC] split standalone_cpp into single headers 2022-03-08 11:56:08 -08:00
include [libc][NFC] Move thread platform data pointer to thread attributes. 2022-07-13 07:09:40 +00:00
lib Use add_llvm_install_targets for install-llvmlibc 2022-07-04 17:18:36 +00:00
loader [libc] Enable a few stdlib and time functions on aarch64. 2022-07-14 14:37:50 -07:00
spec [libc] Add implementations of pthread_equal and pthread_self. 2022-07-14 20:12:35 +00:00
src [libc] Fix API for remove_{prefix, suffix} 2022-07-18 14:40:09 +00:00
test [libc] Fix API for remove_{prefix, suffix} 2022-07-18 14:40:09 +00:00
utils [libc] Specify rounding mode for strto[f|d] tests 2022-07-13 20:20:30 +00:00
.clang-tidy [libc] Add a naming rule for global constants. 2022-01-19 22:11:16 +00:00
.gitignore [libc][Obvious] Add build folder to .gitignore. 2022-03-04 13:16:55 -05:00
CMakeLists.txt [libc] Implement FLAGS option for generating all combinations for targets. 2022-06-01 00:54:07 -04:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.