mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 16:29:50 +08:00
5fd17ab1b093f6b59aabb27f6c2c2278e65c2707
<string.h> and wcschr, wcspbrk, wcsrchr, wmemchr, and wcsstr from <wchar.h> to provide a const-correct overload set even when the underlying C library does not. This change adds a new macro, _LIBCPP_PREFERRED_OVERLOAD, which (if defined) specifies that a given overload is a better match than an otherwise equally good function declaration without the overload. This is implemented in modern versions of Clang via __attribute__((enable_if)), and not elsewhere. We use this new macro to define overloads in the global namespace for these functions that displace the overloads provided by the C library, unless we believe the C library is already providing the correct signatures. llvm-svn: 260337
…
Languages
LLVM
41.3%
C++
31.5%
C
13%
Assembly
9.5%
MLIR
1.5%
Other
2.8%