[libc-commits] [libc] a255da0 - [libc] clean up duplicated includes in generated headers (#124524)
via libc-commits
libc-commits at lists.llvm.org
Tue Jan 28 12:22:54 PST 2025
Author: Alex Prabhat Bara
Date: 2025-01-28T12:22:51-08:00
New Revision: a255da0c5373f4ebd10c91b011cd572e4d2a6b4c
URL: https://github.com/llvm/llvm-project/commit/a255da0c5373f4ebd10c91b011cd572e4d2a6b4c
DIFF: https://github.com/llvm/llvm-project/commit/a255da0c5373f4ebd10c91b011cd572e4d2a6b4c.diff
LOG: [libc] clean up duplicated includes in generated headers (#124524)
Fixes: #124149
Added:
Modified:
libc/include/locale.h.def
libc/include/locale.yaml
libc/include/math.h.def
libc/include/setjmp.h.def
libc/include/stdlib.h.def
libc/include/stdlib.yaml
libc/include/string.h.def
libc/include/string.yaml
libc/include/sys/time.h.def
libc/include/sys/time.yaml
libc/include/wchar.h.def
Removed:
################################################################################
diff --git a/libc/include/locale.h.def b/libc/include/locale.h.def
index 516c6e6275e681..930373eade4d5d 100644
--- a/libc/include/locale.h.def
+++ b/libc/include/locale.h.def
@@ -12,8 +12,6 @@
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/locale-macros.h"
-#include "llvm-libc-types/locale_t.h"
-#include "llvm-libc-types/struct_lconv.h"
%%public_api()
diff --git a/libc/include/locale.yaml b/libc/include/locale.yaml
index 9ff53c16398a59..6c71b70e59f0b6 100644
--- a/libc/include/locale.yaml
+++ b/libc/include/locale.yaml
@@ -1,5 +1,8 @@
header: locale.h
header_template: locale.h.def
+types:
+ - type_name: locale_t
+ - type_name: struct_lconv
functions:
- name: localeconv
standards:
diff --git a/libc/include/math.h.def b/libc/include/math.h.def
index 9822d8bd7ba173..9cfc2f7ea084e4 100644
--- a/libc/include/math.h.def
+++ b/libc/include/math.h.def
@@ -12,7 +12,6 @@
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/float16-macros.h"
#include "llvm-libc-macros/math-macros.h"
-#include "llvm-libc-types/float128.h"
%%public_api()
diff --git a/libc/include/setjmp.h.def b/libc/include/setjmp.h.def
index cb083b8cd023e0..670bc1ac0fe245 100644
--- a/libc/include/setjmp.h.def
+++ b/libc/include/setjmp.h.def
@@ -10,7 +10,6 @@
#define LLVM_LIBC_SETJMP_H
#include "__llvm-libc-common.h"
-#include "llvm-libc-types/jmp_buf.h"
%%public_api()
diff --git a/libc/include/stdlib.h.def b/libc/include/stdlib.h.def
index 01b0e1a2395a29..d523f7a53024aa 100644
--- a/libc/include/stdlib.h.def
+++ b/libc/include/stdlib.h.def
@@ -10,7 +10,6 @@
#define LLVM_LIBC_STDLIB_H
#include "__llvm-libc-common.h"
-#include "llvm-libc-types/locale_t.h"
#include "llvm-libc-macros/stdlib-macros.h"
%%public_api()
diff --git a/libc/include/stdlib.yaml b/libc/include/stdlib.yaml
index 4b68f272613b10..c231a797bd445c 100644
--- a/libc/include/stdlib.yaml
+++ b/libc/include/stdlib.yaml
@@ -8,10 +8,11 @@ types:
- type_name: __qsortrcompare_t
- type_name: __qsortcompare_t
- type_name: __bsearchcompare_t
- - type_name: size_t
- - type_name: lldiv_t
- - type_name: ldiv_t
- type_name: div_t
+ - type_name: ldiv_t
+ - type_name: lldiv_t
+ - type_name: locale_t
+ - type_name: size_t
enums: []
objects: []
functions:
diff --git a/libc/include/string.h.def b/libc/include/string.h.def
index e180f0d2561d3a..1bd2687db2beac 100644
--- a/libc/include/string.h.def
+++ b/libc/include/string.h.def
@@ -11,7 +11,6 @@
#include "__llvm-libc-common.h"
-#include "llvm-libc-types/locale_t.h"
#include "llvm-libc-macros/null-macro.h"
%%public_api()
diff --git a/libc/include/string.yaml b/libc/include/string.yaml
index deded309abc2cb..9f72b8db6c1ebf 100644
--- a/libc/include/string.yaml
+++ b/libc/include/string.yaml
@@ -2,6 +2,7 @@ header: string.h
header_template: string.h.def
macros: []
types:
+ - type_name: locale_t
- type_name: size_t
enums: []
objects: []
diff --git a/libc/include/sys/time.h.def b/libc/include/sys/time.h.def
index b37555e5849574..8b7c9ec669b2ff 100644
--- a/libc/include/sys/time.h.def
+++ b/libc/include/sys/time.h.def
@@ -11,8 +11,6 @@
#include "__llvm-libc-common.h"
-#include "../llvm-libc-types/struct_timeval.h"
-
#include "../llvm-libc-macros/sys-time-macros.h"
%%public_api()
diff --git a/libc/include/sys/time.yaml b/libc/include/sys/time.yaml
index 687c1f83028d01..ca497bbe92995a 100644
--- a/libc/include/sys/time.yaml
+++ b/libc/include/sys/time.yaml
@@ -2,7 +2,8 @@ header: sys/time.h
header_template: time.h.def
standards: Linux
macros: []
-types: []
+types:
+ - type_name: struct_timeval
enums: []
functions: []
objects: []
diff --git a/libc/include/wchar.h.def b/libc/include/wchar.h.def
index d0de1a6762a392..4c25de700d6063 100644
--- a/libc/include/wchar.h.def
+++ b/libc/include/wchar.h.def
@@ -11,8 +11,6 @@
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/wchar-macros.h"
-#include "llvm-libc-types/wint_t.h"
-#include "llvm-libc-types/mbstate_t.h"
%%public_api()
More information about the libc-commits
mailing list