diff options
author | Siva Chandra Reddy <sivachandra@google.com> | 2022-11-06 06:25:15 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@google.com> | 2022-11-07 21:47:29 +0000 |
commit | 6a6101958a9ef3dd076f3c65b5d7b200314c0a8c (patch) | |
tree | 47e897d2d133c10447a79cb61fa00158aae22bf7 /libc/spec | |
parent | 4fa00ce15c842aa8be495759723e2e2450591380 (diff) | |
download | llvm-6a6101958a9ef3dd076f3c65b5d7b200314c0a8c.tar.gz |
[libc] Add implementation of getc, getc_unlocked and fgetc_unlocked.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D137507
Diffstat (limited to 'libc/spec')
-rw-r--r-- | libc/spec/gnu_ext.td | 5 | ||||
-rw-r--r-- | libc/spec/posix.td | 5 | ||||
-rw-r--r-- | libc/spec/stdc.td | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/libc/spec/gnu_ext.td b/libc/spec/gnu_ext.td index ebadbb6f12c4..239790bb9bdc 100644 --- a/libc/spec/gnu_ext.td +++ b/libc/spec/gnu_ext.td @@ -137,6 +137,11 @@ def GnuExtensions : StandardSpec<"GNUExtensions"> { ArgSpec<SizeTType>, ArgSpec<FILERestrictedPtr>] >, + FunctionSpec< + "fgetc_unlocked", + RetValSpec<IntType>, + [ArgSpec<FILEPtr>] + >, ] >; diff --git a/libc/spec/posix.td b/libc/spec/posix.td index 43b3319059c9..0333c6e47c4d 100644 --- a/libc/spec/posix.td +++ b/libc/spec/posix.td @@ -1011,6 +1011,11 @@ def POSIX : StandardSpec<"POSIX"> { RetValSpec<VoidType>, [ArgSpec<FILEPtr>] >, + FunctionSpec< + "getc_unlocked", + RetValSpec<IntType>, + [ArgSpec<FILEPtr>] + >, ] >; diff --git a/libc/spec/stdc.td b/libc/spec/stdc.td index bb3f9a1c701b..4d1295313e5a 100644 --- a/libc/spec/stdc.td +++ b/libc/spec/stdc.td @@ -569,6 +569,11 @@ def StdC : StandardSpec<"stdc"> { [ArgSpec<FILEPtr>] >, FunctionSpec< + "getc", + RetValSpec<IntType>, + [ArgSpec<FILEPtr>] + >, + FunctionSpec< "putc", RetValSpec<IntType>, [ArgSpec<IntType>, |