diff options
Diffstat (limited to 'libc/include')
-rw-r--r-- | libc/include/CMakeLists.txt | 6 | ||||
-rw-r--r-- | libc/include/string.h | 66 | ||||
-rw-r--r-- | libc/include/string.h.def | 16 |
3 files changed, 19 insertions, 69 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index 285960209cb..9069ddb0f59 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -21,10 +21,10 @@ add_header( llvm_libc_common_h ) -add_header( +add_gen_header( string_h - HDR - string.h + DEF_FILE string.h.def + GEN_HDR string.h DEPENDS llvm_libc_common_h ) diff --git a/libc/include/string.h b/libc/include/string.h deleted file mode 100644 index 020c5437cd2..00000000000 --- a/libc/include/string.h +++ /dev/null @@ -1,66 +0,0 @@ -//===---------------- C standard library header string.h ------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBC_STRING_H -#define LLVM_LIBC_STRING_H - -#include <__llvm-libc-common.h> - -#define __need_size_t // To get only size_t from stddef.h -#define __need_NULL // To get only NULL from stddef.h -#include <stddef.h> - -__BEGIN_C_DECLS - -void *memcpy(void *__restrict, const void *__restrict, size_t); - -void *memmove(void *, const void *, size_t); - -int memcmp(const void *, const void *, size_t); - -void *memchr(const void *, int, size_t); - -void *memset(void *, int, size_t); - -char *strcpy(char *__restrict, const char *__restrict); - -char *strncpy(char *__restrict, const char *__restrict, size_t); - -char *strcat(char *__restrict, const char *__restrict); - -char *strncat(char *, const char *, size_t); - -int strcmp(const char *, const char *); - -int strcoll(const char *, const char *); - -int strncmp(const char *, const char *, size_t); - -size_t strxfrm(char *__restrict, const char *__restrict, size_t); - -char *strchr(const char *, int); - -size_t strcspn(const char *, const char *); - -char *strpbrk(const char *, const char *); - -char *strrchr(const char *, int c); - -size_t strspn(const char *, const char *); - -char *strstr(const char *, const char *); - -char *strtok(char *__restrict, const char *__restrict); - -char *strerror(int); - -size_t strlen(const char *); - -__END_C_DECLS - -#endif // LLVM_LIBC_STRING_H diff --git a/libc/include/string.h.def b/libc/include/string.h.def new file mode 100644 index 00000000000..c2d530062ba --- /dev/null +++ b/libc/include/string.h.def @@ -0,0 +1,16 @@ +//===---------------- C standard library header string.h ------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_STRING_H +#define LLVM_LIBC_STRING_H + +#include <__llvm-libc-common.h> + +%%public_api() + +#endif // LLVM_LIBC_STRING_H |