diff options
author | Alex Brachet <abrachet@google.com> | 2023-01-11 05:38:33 +0000 |
---|---|---|
committer | Alex Brachet <abrachet@google.com> | 2023-01-11 05:38:33 +0000 |
commit | e9d571d3b6829f668e424d9dfce09f9ed7f297d9 (patch) | |
tree | 6c83db6dbdad46495432e6982adcc84d88367927 /libc/spec | |
parent | fae63a9a227aa341c4410dbd9e4650844a2c8961 (diff) | |
download | llvm-e9d571d3b6829f668e424d9dfce09f9ed7f297d9.tar.gz |
[libc] Implement str{,n}casecmp
Differential Revision: https://reviews.llvm.org/D141236
Diffstat (limited to 'libc/spec')
-rw-r--r-- | libc/spec/bsd_ext.td | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libc/spec/bsd_ext.td b/libc/spec/bsd_ext.td index 5779ab79c4f1..9ee07ce4e182 100644 --- a/libc/spec/bsd_ext.td +++ b/libc/spec/bsd_ext.td @@ -18,6 +18,25 @@ def BsdExtensions : StandardSpec<"BSDExtensions"> { ] >; + HeaderSpec Strings = HeaderSpec< + "strings.h", + [], // Macros + [], // Types + [], // Enumerations + [ + FunctionSpec< + "strcasecmp", + RetValSpec<IntType>, + [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>] + >, + FunctionSpec< + "strncasecmp", + RetValSpec<IntType>, + [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>] + >, + ] + >; + HeaderSpec SysWait = HeaderSpec< "sys/wait.h", [], // Macros @@ -34,6 +53,7 @@ def BsdExtensions : StandardSpec<"BSDExtensions"> { let Headers = [ String, + Strings, SysWait, ]; } |