[libc][NFC] Add 'struct_' prefix to type headers defining struct types.
authorSiva Chandra Reddy <sivachandra@google.com>
Fri, 21 Jan 2022 06:28:42 +0000 (06:28 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 21 Jan 2022 07:04:32 +0000 (07:04 +0000)
This allows header generator to generate type inclusion boiler plate in
a straightforward manner.

libc/config/linux/api.td
libc/include/CMakeLists.txt
libc/include/llvm-libc-types/CMakeLists.txt
libc/include/llvm-libc-types/struct_sigaction.h [moved from libc/include/llvm-libc-types/__sigaction.h with 100% similarity]
libc/include/llvm-libc-types/struct_tm.h [moved from libc/include/llvm-libc-types/tm.h with 100% similarity]

index f882ec3..48cd1c1 100644 (file)
@@ -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>
   }];
 }
 
index 0b62563..d3b813b 100644 (file)
@@ -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
 )
 
index 73c2958..3c9bed7 100644 (file)
@@ -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)