[libc-commits] [PATCH] D80010: [libc] Add memset and bzero implementations

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri May 15 08:06:25 PDT 2020


gchatelet marked an inline comment as done.
gchatelet added inline comments.


================
Comment at: libc/src/string/memory_utils/memset_utils.h:20
+template <size_t kBlockSize> static void SetBlock(char *dst, unsigned value) {
+  __builtin_memset(dst, value, kBlockSize);
+}
----------------
Theoretically the compiler is allowed to call `memset`here and end up with a recursive call, practically it doesn't happen, however this should be replaced with a `__builtin_memset_inline` once it's available in clang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80010





More information about the libc-commits mailing list