166d00febSPaula Toth //===-- Implementation of strlen ------------------------------------------===// 21fcfd30fSPaula Toth // 31fcfd30fSPaula Toth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 41fcfd30fSPaula Toth // See https://llvm.org/LICENSE.txt for license information. 51fcfd30fSPaula Toth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 61fcfd30fSPaula Toth // 71fcfd30fSPaula Toth //===----------------------------------------------------------------------===// 81fcfd30fSPaula Toth 91fcfd30fSPaula Toth #include "src/string/strlen.h" 10*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 11c92d1aa4Scgyurgyik #include "src/string/string_utils.h" 121fcfd30fSPaula Toth 131fcfd30fSPaula Toth #include "src/__support/common.h" 141fcfd30fSPaula Toth 15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 161fcfd30fSPaula Toth 171fcfd30fSPaula Toth // TODO: investigate the performance of this function. 180570de73SKazuaki Ishizaki // There might be potential for compiler optimization. 19a0b65a7bSMichael Jones LLVM_LIBC_FUNCTION(size_t, strlen, (const char *src)) { 20c92d1aa4Scgyurgyik return internal::string_length(src); 211fcfd30fSPaula Toth } 221fcfd30fSPaula Toth 23*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 24