[libc-commits] [PATCH] D85615: [libc] Add strtok implementation.

Chris Gyurgyik via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Aug 9 10:48:16 PDT 2020


cgyurgyik created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added a project: libc-project.
cgyurgyik requested review of this revision.

Rationale: Calling `strspn` and `strcspn` in `strtok` would currently create two separate `Bitset` instances and loop through the delimiters twice. We can avoid this by creating one instance inside the `strtok` function.

Also removes unnecessary header from String utils.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85615

Files:
  libc/config/linux/aarch64/entrypoints.txt
  libc/config/linux/x86_64/entrypoints.txt
  libc/src/string/CMakeLists.txt
  libc/src/string/string_utils.h
  libc/src/string/strtok.cpp
  libc/src/string/strtok.h
  libc/test/src/string/CMakeLists.txt
  libc/test/src/string/strtok_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85615.284219.patch
Type: text/x-patch
Size: 6961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200809/abd89583/attachment.bin>


More information about the libc-commits mailing list