EricWF requested changes to this revision.
EricWF added a comment.
This revision now requires changes to proceed.
Marking as "Changes requested". I'll take a look at this again once the if-def
hell around `find` and `compare` are cleaned up.
https://reviews.llvm.org/D26896
_
EricWF added a comment.
The tests LGTM. The implementation still needs some tweaks. Thanks for working
on this.
Comment at: include/__config:925
+#if !__has_builtin(__builtin_memcpy)
+#define _LIBCPP_HAS_NO_BUILTIN_MEMCPY
AntonBikineev wrote:
> EricWF wrote:
EricWF added a comment.
FYI there is a relevent GCC bug here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
https://reviews.llvm.org/D26896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
mclow.lists added inline comments.
Comment at: include/__string:213
-static inline int compare(const char_type* __s1, const char_type* __s2,
size_t __n) _NOEXCEPT
-{return __n == 0 ? 0 : memcmp(__s1, __s2, __n);}
-static inline size_t length(const char_type* __
AntonBikineev marked 2 inline comments as done.
AntonBikineev added inline comments.
Comment at: include/__config:925
+#if !__has_builtin(__builtin_memcpy)
+#define _LIBCPP_HAS_NO_BUILTIN_MEMCPY
EricWF wrote:
> What about GCC? Surely it implements some if not m
AntonBikineev updated this revision to Diff 79218.
AntonBikineev added a comment.
Support gcc's __builtin_memcpy, memchr, strlen
https://reviews.llvm.org/D26896
Files:
include/__config
include/__string
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.c
EricWF added inline comments.
Comment at: include/__string:213
-static inline int compare(const char_type* __s1, const char_type* __s2,
size_t __n) _NOEXCEPT
-{return __n == 0 ? 0 : memcmp(__s1, __s2, __n);}
-static inline size_t length(const char_type* __s) _
EricWF added a comment.
Could you please generate this patch with more context? (ie with -U999 or
similar).
Comment at: include/__config:925
+#if !__has_builtin(__builtin_memcpy)
+#define _LIBCPP_HAS_NO_BUILTIN_MEMCPY
What about GCC? Surely it implements som
AntonBikineev updated this revision to Diff 78773.
https://reviews.llvm.org/D26896
Files:
include/__config
include/__string
test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp
test/std/strings/char.traits/char.traits.specializations
mclow.lists added a comment.
Tests look good; I'm still staring at the stuff in `<__string>`.
Comment at: include/__string:138
template
-inline
-const _CharT*
+_LIBCPP_CONSTEXPR_AFTER_CXX14 inline const _CharT*
char_traits<_CharT>::find(const char_type* __s, size_t __n, cons
10 matches
Mail list logo