From: Siva Chandra Reddy Date: Sun, 5 Mar 2023 02:58:45 +0000 (+0000) Subject: [libc][Obvious] Add the LIBC_INLINE tag to a function define in a.h file. X-Git-Tag: upstream/17.0.6~15845 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab07fd9ffa3a76a4608ee7ac884960c982972d8c;p=platform%2Fupstream%2Fllvm.git [libc][Obvious] Add the LIBC_INLINE tag to a function define in a.h file. --- diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt index 13b9e01..6dfb6d7 100644 --- a/libc/src/string/CMakeLists.txt +++ b/libc/src/string/CMakeLists.txt @@ -20,6 +20,7 @@ add_header_library( .memory_utils.memcpy_implementation libc.include.stdlib libc.src.__support.CPP.optional + libc.src.__support.macros.config ) add_entrypoint_object( diff --git a/libc/src/string/allocating_string_utils.h b/libc/src/string/allocating_string_utils.h index 93d1c7a..71fab3d 100644 --- a/libc/src/string/allocating_string_utils.h +++ b/libc/src/string/allocating_string_utils.h @@ -11,6 +11,7 @@ #include "src/__support/CPP/new.h" #include "src/__support/CPP/optional.h" +#include "src/__support/macros/config.h" #include "src/string/memory_utils/memcpy_implementations.h" // For string_length #include "src/string/string_utils.h" @@ -19,7 +20,7 @@ namespace __llvm_libc { namespace internal { -cpp::optional strdup(const char *src) { +LIBC_INLINE cpp::optional strdup(const char *src) { if (src == nullptr) return cpp::nullopt; size_t len = string_length(src) + 1;