aboutsummaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/CMakeLists.txt13
-rw-r--r--libc/include/llvm-libc-macros/gpu/signal-macros.h9
-rw-r--r--libc/include/llvm-libc-macros/linux/signal-macros.h9
-rw-r--r--libc/include/llvm-libc-types/CMakeLists.txt13
-rw-r--r--libc/include/llvm-libc-types/int_hk_t.h14
-rw-r--r--libc/include/llvm-libc-types/int_hr_t.h14
-rw-r--r--libc/include/llvm-libc-types/int_k_t.h14
-rw-r--r--libc/include/llvm-libc-types/int_lk_t.h14
-rw-r--r--libc/include/llvm-libc-types/int_lr_t.h14
-rw-r--r--libc/include/llvm-libc-types/int_r_t.h14
-rw-r--r--libc/include/llvm-libc-types/stdfix-types.h25
-rw-r--r--libc/include/llvm-libc-types/uint_uhk_t.h14
-rw-r--r--libc/include/llvm-libc-types/uint_uhr_t.h14
-rw-r--r--libc/include/llvm-libc-types/uint_uk_t.h14
-rw-r--r--libc/include/llvm-libc-types/uint_ulk_t.h14
-rw-r--r--libc/include/llvm-libc-types/uint_ulr_t.h14
-rw-r--r--libc/include/llvm-libc-types/uint_ur_t.h14
-rw-r--r--libc/include/stdfix.yaml14
18 files changed, 217 insertions, 34 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index a277690..7b52daf 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -166,7 +166,18 @@ add_header_macro(
stdfix.h
DEPENDS
.llvm-libc-macros.stdfix_macros
- .llvm-libc-types.stdfix-types
+ .llvm-libc-types.int_hk_t
+ .llvm-libc-types.int_hr_t
+ .llvm-libc-types.int_k_t
+ .llvm-libc-types.int_lk_t
+ .llvm-libc-types.int_lr_t
+ .llvm-libc-types.int_r_t
+ .llvm-libc-types.uint_uhk_t
+ .llvm-libc-types.uint_uhr_t
+ .llvm-libc-types.uint_uk_t
+ .llvm-libc-types.uint_ulk_t
+ .llvm-libc-types.uint_ulr_t
+ .llvm-libc-types.uint_ur_t
)
diff --git a/libc/include/llvm-libc-macros/gpu/signal-macros.h b/libc/include/llvm-libc-macros/gpu/signal-macros.h
index f0d49ea..76488e9 100644
--- a/libc/include/llvm-libc-macros/gpu/signal-macros.h
+++ b/libc/include/llvm-libc-macros/gpu/signal-macros.h
@@ -9,6 +9,8 @@
#ifndef LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
#define LLVM_LIBC_MACROS_GPU_SIGNAL_MACROS_H
+#include "__llvm-libc-common.h"
+
#define SIGINT 2
#define SIGILL 4
#define SIGABRT 6
@@ -16,9 +18,10 @@
#define SIGSEGV 11
#define SIGTERM 15
-#define SIG_DFL ((void (*)(int))(0))
-#define SIG_IGN ((void (*)(int))(1))
-#define SIG_ERR ((void (*)(int))(-1))
+#define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), -1)
+#define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 0)
+#define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 1)
+#define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 2)
// Max signal number
#define NSIG 64
diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h
index d220241..e7f268d 100644
--- a/libc/include/llvm-libc-macros/linux/signal-macros.h
+++ b/libc/include/llvm-libc-macros/linux/signal-macros.h
@@ -9,6 +9,8 @@
#ifndef LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
#define LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
+#include "__llvm-libc-common.h"
+
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
@@ -86,9 +88,10 @@
#error "Signal stack sizes not defined for your platform."
#endif
-#define SIG_DFL ((void (*)(int))0)
-#define SIG_IGN ((void (*)(int))1)
-#define SIG_ERR ((void (*)(int))(-1))
+#define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), -1)
+#define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 0)
+#define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 1)
+#define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, void (*)(int), 2)
// SIGCHLD si_codes
#define CLD_EXITED 1 // child has exited
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index a428a0e..fcd0e12 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -174,7 +174,18 @@ DEPENDS
)
add_header(locale_t HDR locale_t.h)
add_header(struct_lconv HDR struct_lconv.h)
-add_header(stdfix-types HDR stdfix-types.h)
+add_header(int_hk_t HDR int_hk_t.h)
+add_header(int_hr_t HDR int_hr_t.h)
+add_header(int_k_t HDR int_k_t.h)
+add_header(int_lk_t HDR int_lk_t.h)
+add_header(int_lr_t HDR int_lr_t.h)
+add_header(int_r_t HDR int_r_t.h)
+add_header(uint_uhk_t HDR uint_uhk_t.h)
+add_header(uint_uhr_t HDR uint_uhr_t.h)
+add_header(uint_uk_t HDR uint_uk_t.h)
+add_header(uint_ulk_t HDR uint_ulk_t.h)
+add_header(uint_ulr_t HDR uint_ulr_t.h)
+add_header(uint_ur_t HDR uint_ur_t.h)
# UEFI
add_header(EFI_GUID HDR EFI_GUID.h DEPENDS libc.include.llvm-libc-macros.stdint_macros)
diff --git a/libc/include/llvm-libc-types/int_hk_t.h b/libc/include/llvm-libc-types/int_hk_t.h
new file mode 100644
index 0000000..eb17224
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_hk_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_HK_T_H
+#define LLVM_LIBC_TYPES_INT_HK_T_H
+
+typedef signed short int_hk_t;
+
+#endif // LLVM_LIBC_TYPES_INT_HK_T_H
diff --git a/libc/include/llvm-libc-types/int_hr_t.h b/libc/include/llvm-libc-types/int_hr_t.h
new file mode 100644
index 0000000..89b57a8
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_hr_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_HR_T_H
+#define LLVM_LIBC_TYPES_INT_HR_T_H
+
+typedef signed char int_hr_t;
+
+#endif // LLVM_LIBC_TYPES_INT_HR_T_H
diff --git a/libc/include/llvm-libc-types/int_k_t.h b/libc/include/llvm-libc-types/int_k_t.h
new file mode 100644
index 0000000..193f9d8
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_k_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_K_T_H
+#define LLVM_LIBC_TYPES_INT_K_T_H
+
+typedef signed int int_k_t;
+
+#endif // LLVM_LIBC_TYPES_INT_K_T_H
diff --git a/libc/include/llvm-libc-types/int_lk_t.h b/libc/include/llvm-libc-types/int_lk_t.h
new file mode 100644
index 0000000..c8f3137
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_lk_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_LK_T_H
+#define LLVM_LIBC_TYPES_INT_LK_T_H
+
+typedef signed long long int_lk_t;
+
+#endif // LLVM_LIBC_TYPES_INT_LK_T_H
diff --git a/libc/include/llvm-libc-types/int_lr_t.h b/libc/include/llvm-libc-types/int_lr_t.h
new file mode 100644
index 0000000..f2987e8
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_lr_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_LR_T_H
+#define LLVM_LIBC_TYPES_INT_LR_T_H
+
+typedef signed int int_lr_t;
+
+#endif // LLVM_LIBC_TYPES_INT_LR_T_H
diff --git a/libc/include/llvm-libc-types/int_r_t.h b/libc/include/llvm-libc-types/int_r_t.h
new file mode 100644
index 0000000..6b528f4
--- /dev/null
+++ b/libc/include/llvm-libc-types/int_r_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_INT_R_T_H
+#define LLVM_LIBC_TYPES_INT_R_T_H
+
+typedef signed short int int_r_t;
+
+#endif // LLVM_LIBC_TYPES_INT_R_T_H
diff --git a/libc/include/llvm-libc-types/stdfix-types.h b/libc/include/llvm-libc-types/stdfix-types.h
deleted file mode 100644
index 542d45e..0000000
--- a/libc/include/llvm-libc-types/stdfix-types.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//===-- Definition of stdfix integer types --------------------------------===//
-//
-// 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_STDFIX_TYPES_H
-#define LLVM_LIBC_TYPES_STDFIX_TYPES_H
-
-typedef signed char int_hr_t;
-typedef signed short int int_r_t;
-typedef signed int int_lr_t;
-typedef signed short int_hk_t;
-typedef signed int int_k_t;
-typedef signed long long int_lk_t;
-typedef unsigned char uint_uhr_t;
-typedef unsigned short int uint_ur_t;
-typedef unsigned int uint_ulr_t;
-typedef unsigned short int uint_uhk_t;
-typedef unsigned int uint_uk_t;
-typedef unsigned long long uint_ulk_t;
-
-#endif // LLVM_LIBC_TYPES_STDFIX_TYPES_H
diff --git a/libc/include/llvm-libc-types/uint_uhk_t.h b/libc/include/llvm-libc-types/uint_uhk_t.h
new file mode 100644
index 0000000..ed0f427
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_uhk_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_UHK_T_H
+#define LLVM_LIBC_TYPES_UINT_UHK_T_H
+
+typedef unsigned short int uint_uhk_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_UHK_T_H
diff --git a/libc/include/llvm-libc-types/uint_uhr_t.h b/libc/include/llvm-libc-types/uint_uhr_t.h
new file mode 100644
index 0000000..e3eab1c
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_uhr_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_UHR_T_H
+#define LLVM_LIBC_TYPES_UINT_UHR_T_H
+
+typedef unsigned char uint_uhr_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_UHR_T_H
diff --git a/libc/include/llvm-libc-types/uint_uk_t.h b/libc/include/llvm-libc-types/uint_uk_t.h
new file mode 100644
index 0000000..f9bbc7b
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_uk_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_UK_T_H
+#define LLVM_LIBC_TYPES_UINT_UK_T_H
+
+typedef unsigned int uint_uk_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_UK_T_H
diff --git a/libc/include/llvm-libc-types/uint_ulk_t.h b/libc/include/llvm-libc-types/uint_ulk_t.h
new file mode 100644
index 0000000..b7a54b0
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_ulk_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_ULK_T_H
+#define LLVM_LIBC_TYPES_UINT_ULK_T_H
+
+typedef unsigned long long uint_ulk_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_ULK_T_H
diff --git a/libc/include/llvm-libc-types/uint_ulr_t.h b/libc/include/llvm-libc-types/uint_ulr_t.h
new file mode 100644
index 0000000..9f4682c
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_ulr_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_ULR_T_H
+#define LLVM_LIBC_TYPES_UINT_ULR_T_H
+
+typedef unsigned int uint_ulr_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_ULR_T_H
diff --git a/libc/include/llvm-libc-types/uint_ur_t.h b/libc/include/llvm-libc-types/uint_ur_t.h
new file mode 100644
index 0000000..267c9c4
--- /dev/null
+++ b/libc/include/llvm-libc-types/uint_ur_t.h
@@ -0,0 +1,14 @@
+//===-- LLVM LIBC TYPES --------------------------------===//
+//
+// 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_UINT_UR_T_H
+#define LLVM_LIBC_TYPES_UINT_UR_T_H
+
+typedef unsigned short int uint_ur_t;
+
+#endif // LLVM_LIBC_TYPES_UINT_UR_T_H
diff --git a/libc/include/stdfix.yaml b/libc/include/stdfix.yaml
index 451330c..9f1a32f 100644
--- a/libc/include/stdfix.yaml
+++ b/libc/include/stdfix.yaml
@@ -8,7 +8,19 @@ macros:
- macro_name: roundfx
macro_header: stdfix-macros.h
types:
- - type_name: stdfix-types
+ - type_name: int_hk_t
+ - type_name: int_hr_t
+ - type_name: int_k_t
+ - type_name: int_lk_t
+ - type_name: int_lr_t
+ - type_name: int_r_t
+ - type_name: uint_uhk_t
+ - type_name: uint_uhr_t
+ - type_name: uint_uk_t
+ - type_name: uint_ulk_t
+ - type_name: uint_ulr_t
+ - type_name: uint_ur_t
+
enums: []
objects: []
functions: