[libc-commits] [PATCH] D85103: [libc] Add strspn implementation.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 5 08:20:38 PDT 2020


sivachandra added inline comments.


================
Comment at: libc/utils/CPP/Bitset.h:18
+
+constexpr size_t BitsPerByte = 8;
+constexpr size_t BitsPerUnit = BitsPerByte * sizeof(uintptr_t);
----------------
Make these static members of Bitset.


================
Comment at: libc/utils/CPP/Bitset.h:36
+                     ? 1
+                     : (NumberOfBits + BitsPerByte - 1) / BitsPerUnit] = {0};
+};
----------------
Sorry, I had a typo in my earlier comment. It should have been:

```
(NumberOfBits + BitsPerUnit - 1)/BitsPerUnit
```

This should handle all cases?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85103/new/

https://reviews.llvm.org/D85103



More information about the libc-commits mailing list