summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorAlex Brachet <abrachet@google.com>2022-10-31 16:55:53 +0000
committerAlex Brachet <abrachet@google.com>2022-10-31 16:55:53 +0000
commit5fd03c81767f27ef190ca08ca940cf32a62417dd (patch)
tree88e63607f196bce4f25ed60f55da3b5d22add08f /libc/include
parent99f9bd4807d6132b603a1910902e4586e20638e0 (diff)
downloadllvm-5fd03c81767f27ef190ca08ca940cf32a62417dd.tar.gz
[libc] Implement getopt
Differential Revision: https://reviews.llvm.org/D133487
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/CMakeLists.txt1
-rw-r--r--libc/include/llvm-libc-types/CMakeLists.txt1
-rw-r--r--libc/include/llvm-libc-types/__getoptargv_t.h14
3 files changed, 16 insertions, 0 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index cb0e885622bc..3e63695e12a2 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -185,6 +185,7 @@ add_gen_header(
.llvm-libc-types.size_t
.llvm-libc-types.ssize_t
.llvm-libc-types.uid_t
+ .llvm-libc-types.__getoptargv_t
)
add_gen_header(
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 1c667d5a55b7..e4e9567d5fdc 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -81,3 +81,4 @@ add_header(__atexithandler_t HDR __atexithandler_t.h)
add_header(speed_t HDR speed_t.h)
add_header(tcflag_t HDR tcflag_t.h)
add_header(struct_termios HDR struct_termios.h DEPENDS .cc_t .speed_t .tcflag_t)
+add_header(__getoptargv_t HDR __getoptargv_t.h)
diff --git a/libc/include/llvm-libc-types/__getoptargv_t.h b/libc/include/llvm-libc-types/__getoptargv_t.h
new file mode 100644
index 000000000000..81c67286c3a7
--- /dev/null
+++ b/libc/include/llvm-libc-types/__getoptargv_t.h
@@ -0,0 +1,14 @@
+//===-- Definition of type __getoptargv_t ---------------------------------===//
+//
+// 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_TYPES_GETOPTARGV_T_H__
+#define __LLVM_LIBC_TYPES_GETOPTARGV_T_H__
+
+typedef char *const __getoptargv_t[];
+
+#endif // __LLVM_LIBC_TYPES_GETOPTARGV_T_H__