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"
10c92d1aa4Scgyurgyik #include "src/string/string_utils.h"
111fcfd30fSPaula Toth 
121fcfd30fSPaula Toth #include "src/__support/common.h"
131fcfd30fSPaula Toth 
141fcfd30fSPaula Toth namespace __llvm_libc {
151fcfd30fSPaula Toth 
161fcfd30fSPaula Toth // TODO: investigate the performance of this function.
170570de73SKazuaki Ishizaki // There might be potential for compiler optimization.
18*a0b65a7bSMichael Jones LLVM_LIBC_FUNCTION(size_t, strlen, (const char *src)) {
19c92d1aa4Scgyurgyik   return internal::string_length(src);
201fcfd30fSPaula Toth }
211fcfd30fSPaula Toth 
221fcfd30fSPaula Toth } // namespace __llvm_libc
23