MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / LLVM_LIBC_FUNCTION

Function LLVM_LIBC_FUNCTION

system/lib/llvm-libc/src/string/memchr.cpp:20–26  ·  view source on GitHub ↗

TODO: Look at performance benefits of comparing words.

Source from the content-addressed store, hash-verified

18
19// TODO: Look at performance benefits of comparing words.
20LLVM_LIBC_FUNCTION(void *, memchr, (const void *src, int c, size_t n)) {
21 if (n)
22 LIBC_CRASH_ON_NULLPTR(src);
23 return internal::find_first_character(
24 reinterpret_cast<const unsigned char *>(src),
25 static_cast<unsigned char>(c), n);
26}
27
28} // namespace LIBC_NAMESPACE_DECL

Callers

nothing calls this directly

Calls 1

find_first_characterFunction · 0.85

Tested by

no test coverage detected