[libc-commits] [libc] f333fc5 - combined string and time functions

Rose Zhang via libc-commits libc-commits at lists.llvm.org
Fri Jun 21 11:25:31 PDT 2024


Author: Rose Zhang
Date: 2024-06-21T18:25:19Z
New Revision: f333fc5c9732a5b64ae0bca09ade6f0036e80c40

URL: https://github.com/llvm/llvm-project/commit/f333fc5c9732a5b64ae0bca09ade6f0036e80c40
DIFF: https://github.com/llvm/llvm-project/commit/f333fc5c9732a5b64ae0bca09ade6f0036e80c40.diff

LOG: combined string and time functions

Added: 
    libc/spec/stdc_assert.yaml
    libc/spec/stdc_ctype.yaml
    libc/spec/stdc_string.yaml

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libc/spec/stdc_assert.yaml b/libc/spec/stdc_assert.yaml
new file mode 100644
index 0000000000000..d0fe3c1684fcc
--- /dev/null
+++ b/libc/spec/stdc_assert.yaml
@@ -0,0 +1,7 @@
+header: "assert.h"
+macros:
+  - name: static_assert
+  - name: assert
+types: []
+enums: []
+functions: []
\ No newline at end of file

diff  --git a/libc/spec/stdc_ctype.yaml b/libc/spec/stdc_ctype.yaml
new file mode 100644
index 0000000000000..19c00097b7331
--- /dev/null
+++ b/libc/spec/stdc_ctype.yaml
@@ -0,0 +1,61 @@
+header: "ctype.h"
+macros: []
+types: []
+enums: []
+functions:
+  - name: isalnum
+    return_type: int
+    arguments:
+      - type: int
+  - name: isalpha
+    return_type: int
+    arguments:
+      - type: int
+  - name: isblank
+    return_type: int
+    arguments:
+      - type: int
+  - name: iscntrl
+    return_type: int
+    arguments:
+      - type: int
+  - name: isdigit
+    return_type: int
+    arguments:
+      - type: int
+  - name: isgraph
+    return_type: int
+    arguments:
+      - type: int
+  - name: islower
+    return_type: int
+    arguments:
+      - type: int
+  - name: isprint
+    return_type: int
+    arguments:
+      - type: int
+  - name: ispunct
+    return_type: int
+    arguments:
+      - type: int
+  - name: isspace
+    return_type: int
+    arguments:
+      - type: int
+  - name: isupper
+    return_type: int
+    arguments:
+      - type: int
+  - name: isxdigit
+    return_type: int
+    arguments:
+      - type: int
+  - name: tolower
+    return_type: int
+    arguments:
+      - type: int
+  - name: toupper
+    return_type: int
+    arguments:
+      - type: int
\ No newline at end of file

diff  --git a/libc/spec/stdc_string.yaml b/libc/spec/stdc_string.yaml
new file mode 100644
index 0000000000000..2558e6f4a94f1
--- /dev/null
+++ b/libc/spec/stdc_string.yaml
@@ -0,0 +1,139 @@
+header: "string.h"
+macros:
+  - name: NULL #this might cause an issue due to YAML syntax
+types:
+  - SizeTType
+enums: []
+functions:
+  - name: memcpy
+    return_type: void *
+    arguments:
+      - type: void *__restrict
+      - type: const void *__restrict
+      - type: size_t
+  - name: memmove
+    return_type: void *
+    arguments:
+      - type: void *
+      - type: const void *
+      - type: size_t
+  - name: memcmp
+    return_type: int
+    arguments:
+      - type: const void *
+      - type: const void *
+      - type: size_t
+  - name: memchr
+    return_type: void *
+    arguments:
+      - type: const void *
+      - type: int
+      - type: size_t
+  - name: memset
+    return_type: void *
+    arguments:
+      - type: void *
+      - type: int
+      - type: size_t
+  - name: memset_explicit
+    return_type: void *
+    arguments:
+      - type: void *
+      - type: int
+      - type: size_t
+  - name: strcpy
+    return_type: char
+    arguments:
+      - type: char *__restrict
+      - type: const char *__restrict
+  - name: strncpy
+    return_type: char *
+    arguments:
+      - type: char *__restrict
+      - type: const char *__restrict
+      - type: size_t
+  - name: strcat
+    return_type: char *
+    arguments:
+      - type: char *__restrict
+      - type: const char *__restrict
+  - name: strncat
+    return_type: char *
+    arguments:
+        - type: char *
+        - type: const char *
+        - type: size_t
+  - name: strcmp
+    return_type: int
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strcoll
+    return_type: int
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strncmp
+    return_type: int
+    arguments:
+      - type: const char *
+      - type: const char *
+      - type: size_t
+  - name: strxfrm
+    return_type: size_t
+    arguments:
+      - type: char *__restrict
+      - type: const char *__restrict
+      - type: size_t
+  - name: strchr
+    return_type: char *
+    arguments:
+      - type: const char *
+      - type: int
+  - name: strcspn
+    return_type: size_t
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strdup
+    return_type: char *
+    arguments:
+      - type: const char *
+  - name: strndup
+    return_type: char *
+    arguments:
+      - type: const char *
+      - type: size_t
+  - name: strpbrk
+    return_type: char *
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strrchr
+    return_type: char *
+    arguments:
+      - type: const char *
+      - type: int
+  - name: strspn
+    return_type: size_t
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strstr
+    return_type: char *
+    arguments:
+      - type: const char *
+      - type: const char *
+  - name: strtok
+    return_type: char *
+    arguments:
+      - type: char *__restrict
+      - type: const char *__restrict
+  - name: strerror
+    return_type: char *
+    arguments:
+      - type: int
+  - name: strlen
+    return_type: size_t
+    arguments:
+      - const char *
\ No newline at end of file


        


More information about the libc-commits mailing list