[libc-commits] [PATCH] D108225: [libc] Add a trivial implementation for bcmp
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Aug 17 12:40:02 PDT 2021
sivachandra added a comment.
LGTM. We need to add an entry for `bcmp` here to keep the integration tests running: https://github.com/llvm/llvm-project/blob/main/libc/spec/llvm_libc_ext.td
Comment at: libc/src/string/bcmp.cpp:18
+ const unsigned char *_rhs = reinterpret_cast<const unsigned char *>(rhs);
+ for (size_t i = 0; i < count; ++i)
+ if (_lhs[i] != _rhs[i])
Nit: Since the body of the `for` loop is more than one line, we should add braces.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits