[libc-commits] [libc] 7f0f4ca - [libc][NFC] Add 'struct_' prefix to type headers defining struct types.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Thu Jan 20 23:16:49 PST 2022
Author: Siva Chandra Reddy
Date: 2022-01-21T07:04:32Z
New Revision: 7f0f4cab18a9e3abf8d0583c1a87e352cd5577a6
URL: https://github.com/llvm/llvm-project/commit/7f0f4cab18a9e3abf8d0583c1a87e352cd5577a6
DIFF: https://github.com/llvm/llvm-project/commit/7f0f4cab18a9e3abf8d0583c1a87e352cd5577a6.diff
LOG: [libc][NFC] Add 'struct_' prefix to type headers defining struct types.
This allows header generator to generate type inclusion boiler plate in
a straightforward manner.
Added:
libc/include/llvm-libc-types/struct_sigaction.h
libc/include/llvm-libc-types/struct_tm.h
Modified:
libc/config/linux/api.td
libc/include/CMakeLists.txt
libc/include/llvm-libc-types/CMakeLists.txt
Removed:
libc/include/llvm-libc-types/__sigaction.h
libc/include/llvm-libc-types/tm.h
################################################################################
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index f882ec304f192..48cd1c1113485 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -24,7 +24,7 @@ def SSizeT : TypeDecl<"ssize_t"> {
def StructTm: TypeDecl<"struct tm"> {
let Decl = [{
- #include <llvm-libc-types/tm.h>
+ #include <llvm-libc-types/struct_tm.h>
}];
}
@@ -334,7 +334,7 @@ def SysMManAPI : PublicAPI<"sys/mman.h"> {
def StructSigactionDefn : TypeDecl<"struct sigaction"> {
let Decl = [{
- #include <llvm-libc-types/__sigaction.h>
+ #include <llvm-libc-types/struct_sigaction.h>
}];
}
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 0b62563f3170a..d3b813b87b49e 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -67,7 +67,7 @@ add_gen_header(
DEPENDS
.llvm_libc_common_h
.llvm-libc-types.time_t
- .llvm-libc-types.tm
+ .llvm-libc-types.struct_tm
)
add_gen_header(
@@ -103,7 +103,7 @@ add_gen_header(
DATA_FILES
../config/${LIBC_TARGET_OS}/signal.h.in
DEPENDS
- .llvm-libc-types.__sigaction
+ .llvm-libc-types.struct_sigaction
.llvm-libc-types.__sighandler_t
)
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index 73c295843e2a4..3c9bed7183b5d 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -1,7 +1,6 @@
add_header(__bsearchcompare_t HDR __bsearchcompare_t.h)
add_header(__call_once_func_t HDR __call_once_func_t.h)
add_header(__qsortcompare_t HDR __qsortcompare_t.h)
-add_header(__sigaction HDR __sigaction.h)
add_header(__sighandler_t HDR __sighandler_t.h)
add_header(cnd_t HDR cnd_t.h)
add_header(double_t HDR double_t.h)
@@ -18,7 +17,8 @@ add_header(off_t HDR off_t.h)
add_header(once_flag HDR once_flag.h)
add_header(size_t HDR size_t.h)
add_header(ssize_t HDR ssize_t.h)
+add_header(struct_sigaction HDR struct_sigaction.h)
+add_header(struct_tm HDR struct_tm.h)
add_header(thrd_start_t HDR thrd_start_t.h)
add_header(thrd_t HDR thrd_t.h)
add_header(time_t HDR time_t.h)
-add_header(tm HDR tm.h)
diff --git a/libc/include/llvm-libc-types/__sigaction.h b/libc/include/llvm-libc-types/struct_sigaction.h
similarity index 100%
rename from libc/include/llvm-libc-types/__sigaction.h
rename to libc/include/llvm-libc-types/struct_sigaction.h
diff --git a/libc/include/llvm-libc-types/tm.h b/libc/include/llvm-libc-types/struct_tm.h
similarity index 100%
rename from libc/include/llvm-libc-types/tm.h
rename to libc/include/llvm-libc-types/struct_tm.h
More information about the libc-commits
mailing list