//===-- Implementation using the __builtin_XXX_inline ---------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file provides generic C++ building blocks to compose memory functions. // They rely on the compiler to generate the best possible code through the use // of the `__builtin_XXX_inline` builtins. These builtins are currently only // available in Clang. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_BUILTIN_H #define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_BUILTIN_H #include "src/__support/CPP/type_traits.h" #include "src/__support/macros/config.h" #include "src/string/memory_utils/utils.h" namespace LIBC_NAMESPACE_DECL { namespace builtin { /////////////////////////////////////////////////////////////////////////////// // Memcpy template <size_t Size> struct Memcpy { … }; /////////////////////////////////////////////////////////////////////////////// // Memset template <size_t Size> struct Memset { … }; /////////////////////////////////////////////////////////////////////////////// // Bcmp template <size_t Size> struct Bcmp { … }; /////////////////////////////////////////////////////////////////////////////// // Memcmp template <size_t Size> struct Memcmp { … }; } // namespace builtin } // namespace LIBC_NAMESPACE_DECL #endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_BUILTIN_H