[libc-commits] [libc] [libc] Use relative inclusion for public headers. (PR #114324)

via libc-commits libc-commits at lists.llvm.org
Wed Oct 30 16:00:46 PDT 2024


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/114324

None

>From 42accefb8076e7766530cb665429ab66b28e03f8 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Wed, 30 Oct 2024 22:52:53 +0000
Subject: [PATCH] [libc] Use relative inclusion for public headers.

---
 libc/include/gpu/rpc.h.def                    |  2 +-
 .../llvm-libc-macros/containerof-macro.h      |  2 +-
 .../llvm-libc-macros/sys-queue-macros.h       |  4 ++--
 libc/include/llvm-libc-types/__mutex_type.h   |  2 +-
 libc/include/llvm-libc-types/cnd_t.h          |  2 +-
 .../llvm-libc-types/cookie_io_functions_t.h   |  6 +++---
 libc/include/llvm-libc-types/fd_set.h         |  2 +-
 libc/include/llvm-libc-types/mtx_t.h          |  2 +-
 libc/include/llvm-libc-types/once_flag.h      |  2 +-
 libc/include/llvm-libc-types/pthread_attr_t.h |  2 +-
 .../include/llvm-libc-types/pthread_mutex_t.h |  2 +-
 libc/include/llvm-libc-types/pthread_once_t.h |  2 +-
 .../llvm-libc-types/pthread_rwlock_t.h        |  4 ++--
 .../llvm-libc-types/pthread_spinlock_t.h      |  2 +-
 libc/include/llvm-libc-types/pthread_t.h      |  2 +-
 libc/include/llvm-libc-types/siginfo_t.h      |  8 ++++----
 libc/include/llvm-libc-types/sigset_t.h       |  2 +-
 libc/include/llvm-libc-types/stack_t.h        |  2 +-
 libc/include/llvm-libc-types/struct_dirent.h  |  4 ++--
 .../llvm-libc-types/struct_epoll_event.h      |  2 +-
 .../llvm-libc-types/struct_f_owner_ex.h       |  2 +-
 libc/include/llvm-libc-types/struct_flock.h   |  4 ++--
 libc/include/llvm-libc-types/struct_flock64.h |  4 ++--
 libc/include/llvm-libc-types/struct_rlimit.h  |  2 +-
 libc/include/llvm-libc-types/struct_rusage.h  |  2 +-
 .../llvm-libc-types/struct_sched_param.h      |  6 +++---
 .../llvm-libc-types/struct_sigaction.h        |  4 ++--
 .../include/llvm-libc-types/struct_sockaddr.h |  2 +-
 .../llvm-libc-types/struct_sockaddr_un.h      |  2 +-
 libc/include/llvm-libc-types/struct_stat.h    | 20 +++++++++----------
 libc/include/llvm-libc-types/struct_termios.h |  6 +++---
 .../include/llvm-libc-types/struct_timespec.h |  2 +-
 libc/include/llvm-libc-types/struct_timeval.h |  4 ++--
 libc/include/llvm-libc-types/thrd_t.h         |  2 +-
 libc/include/sys/auxv.h.def                   |  2 +-
 libc/include/sys/epoll.h.def                  |  2 +-
 libc/include/sys/ioctl.h.def                  |  2 +-
 libc/include/sys/mman.h.def                   |  2 +-
 libc/include/sys/queue.h                      |  2 +-
 libc/include/sys/random.h.def                 |  2 +-
 libc/include/sys/resource.h.def               |  2 +-
 libc/include/sys/select.h.def                 |  2 +-
 libc/include/sys/socket.h.def                 |  2 +-
 libc/include/sys/stat.h.def                   |  2 +-
 libc/include/sys/time.h.def                   |  4 ++--
 libc/include/sys/wait.h.def                   |  2 +-
 libc/utils/gpu/loader/Loader.h                |  2 +-
 47 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/libc/include/gpu/rpc.h.def b/libc/include/gpu/rpc.h.def
index 72acf0c8142281..060650345e1fb1 100644
--- a/libc/include/gpu/rpc.h.def
+++ b/libc/include/gpu/rpc.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-types/rpc_opcodes_t.h"
+#include "../llvm-libc-types/rpc_opcodes_t.h"
 
 %%public_api()
 
diff --git a/libc/include/llvm-libc-macros/containerof-macro.h b/libc/include/llvm-libc-macros/containerof-macro.h
index 592acd6e3aa98c..debf441bf845e3 100644
--- a/libc/include/llvm-libc-macros/containerof-macro.h
+++ b/libc/include/llvm-libc-macros/containerof-macro.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
 #define LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
 
-#include "llvm-libc-macros/offsetof-macro.h"
+#include "offsetof-macro.h"
 
 #define __containerof(ptr, type, member)                                       \
   ({                                                                           \
diff --git a/libc/include/llvm-libc-macros/sys-queue-macros.h b/libc/include/llvm-libc-macros/sys-queue-macros.h
index 089b6abaa02409..21e80f42a91db9 100644
--- a/libc/include/llvm-libc-macros/sys-queue-macros.h
+++ b/libc/include/llvm-libc-macros/sys-queue-macros.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_MACROS_SYS_QUEUE_MACROS_H
 #define LLVM_LIBC_MACROS_SYS_QUEUE_MACROS_H
 
-#include "llvm-libc-macros/containerof-macro.h"
-#include "llvm-libc-macros/null-macro.h"
+#include "containerof-macro.h"
+#include "null-macro.h"
 
 #ifdef __cplusplus
 #define QUEUE_TYPEOF(type) type
diff --git a/libc/include/llvm-libc-types/__mutex_type.h b/libc/include/llvm-libc-types/__mutex_type.h
index 3779c78203ed8a..83556162614958 100644
--- a/libc/include/llvm-libc-types/__mutex_type.h
+++ b/libc/include/llvm-libc-types/__mutex_type.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES___MUTEX_TYPE_H
 #define LLVM_LIBC_TYPES___MUTEX_TYPE_H
 
-#include "llvm-libc-types/__futex_word.h"
+#include "__futex_word.h"
 
 typedef struct {
   unsigned char __timed;
diff --git a/libc/include/llvm-libc-types/cnd_t.h b/libc/include/llvm-libc-types/cnd_t.h
index 266dfbb5889268..77ec58352f074e 100644
--- a/libc/include/llvm-libc-types/cnd_t.h
+++ b/libc/include/llvm-libc-types/cnd_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_CND_T_H
 #define LLVM_LIBC_TYPES_CND_T_H
 
-#include "llvm-libc-types/__futex_word.h"
+#include "__futex_word.h"
 
 typedef struct {
   void *__qfront;
diff --git a/libc/include/llvm-libc-types/cookie_io_functions_t.h b/libc/include/llvm-libc-types/cookie_io_functions_t.h
index a3e7c32a50966a..d1eea8ff3b5dc7 100644
--- a/libc/include/llvm-libc-types/cookie_io_functions_t.h
+++ b/libc/include/llvm-libc-types/cookie_io_functions_t.h
@@ -9,9 +9,9 @@
 #ifndef LLVM_LIBC_TYPES_COOKIE_IO_FUNCTIONS_T_H
 #define LLVM_LIBC_TYPES_COOKIE_IO_FUNCTIONS_T_H
 
-#include "llvm-libc-types/off64_t.h"
-#include "llvm-libc-types/size_t.h"
-#include "llvm-libc-types/ssize_t.h"
+#include "off64_t.h"
+#include "size_t.h"
+#include "ssize_t.h"
 
 typedef ssize_t cookie_read_function_t(void *, char *, size_t);
 typedef ssize_t cookie_write_function_t(void *, const char *, size_t);
diff --git a/libc/include/llvm-libc-types/fd_set.h b/libc/include/llvm-libc-types/fd_set.h
index fd1bde24c90e8d..7835a916712a0b 100644
--- a/libc/include/llvm-libc-types/fd_set.h
+++ b/libc/include/llvm-libc-types/fd_set.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_FD_SET_H
 #define LLVM_LIBC_TYPES_FD_SET_H
 
-#include "llvm-libc-macros/sys-select-macros.h" // FD_SETSIZE
+#include "../llvm-libc-macros/sys-select-macros.h" // FD_SETSIZE
 
 typedef struct {
   __FD_SET_WORD_TYPE __set[__FD_SET_ARRAYSIZE];
diff --git a/libc/include/llvm-libc-types/mtx_t.h b/libc/include/llvm-libc-types/mtx_t.h
index ebf79871c93575..56e41bdf89bce5 100644
--- a/libc/include/llvm-libc-types/mtx_t.h
+++ b/libc/include/llvm-libc-types/mtx_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_MTX_T_H
 #define LLVM_LIBC_TYPES_MTX_T_H
 
-#include "llvm-libc-types/__mutex_type.h"
+#include "__mutex_type.h"
 
 typedef __mutex_type mtx_t;
 
diff --git a/libc/include/llvm-libc-types/once_flag.h b/libc/include/llvm-libc-types/once_flag.h
index f80d35e317e99a..b3b7e0de988ca2 100644
--- a/libc/include/llvm-libc-types/once_flag.h
+++ b/libc/include/llvm-libc-types/once_flag.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_ONCE_FLAG_H
 #define LLVM_LIBC_TYPES_ONCE_FLAG_H
 
-#include "llvm-libc-types/__futex_word.h"
+#include "__futex_word.h"
 
 #ifdef __linux__
 typedef __futex_word once_flag;
diff --git a/libc/include/llvm-libc-types/pthread_attr_t.h b/libc/include/llvm-libc-types/pthread_attr_t.h
index 7512193ef97be2..e686ac91a6fe58 100644
--- a/libc/include/llvm-libc-types/pthread_attr_t.h
+++ b/libc/include/llvm-libc-types/pthread_attr_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_PTHREAD_ATTR_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_ATTR_T_H
 
-#include "llvm-libc-types/size_t.h"
+#include "size_t.h"
 
 typedef struct {
   int __detachstate;
diff --git a/libc/include/llvm-libc-types/pthread_mutex_t.h b/libc/include/llvm-libc-types/pthread_mutex_t.h
index cf2194d719f354..1535cba658350e 100644
--- a/libc/include/llvm-libc-types/pthread_mutex_t.h
+++ b/libc/include/llvm-libc-types/pthread_mutex_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_PTHREAD_MUTEX_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_MUTEX_T_H
 
-#include "llvm-libc-types/__mutex_type.h"
+#include "__mutex_type.h"
 
 typedef __mutex_type pthread_mutex_t;
 
diff --git a/libc/include/llvm-libc-types/pthread_once_t.h b/libc/include/llvm-libc-types/pthread_once_t.h
index 8ea926f4ee7dc4..12a81502baaf04 100644
--- a/libc/include/llvm-libc-types/pthread_once_t.h
+++ b/libc/include/llvm-libc-types/pthread_once_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_PTHREAD_ONCE_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_ONCE_T_H
 
-#include "llvm-libc-types/__futex_word.h"
+#include "__futex_word.h"
 
 #ifdef __linux__
 typedef __futex_word pthread_once_t;
diff --git a/libc/include/llvm-libc-types/pthread_rwlock_t.h b/libc/include/llvm-libc-types/pthread_rwlock_t.h
index da49a155a2bdb0..4a7c6c75250a82 100644
--- a/libc/include/llvm-libc-types/pthread_rwlock_t.h
+++ b/libc/include/llvm-libc-types/pthread_rwlock_t.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_PTHREAD_RWLOCK_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_RWLOCK_T_H
 
-#include "llvm-libc-types/__futex_word.h"
-#include "llvm-libc-types/pid_t.h"
+#include "__futex_word.h"
+#include "pid_t.h"
 typedef struct {
   unsigned __is_pshared : 1;
   unsigned __preference : 1;
diff --git a/libc/include/llvm-libc-types/pthread_spinlock_t.h b/libc/include/llvm-libc-types/pthread_spinlock_t.h
index 03eb02dded9eff..afb4fe91edd2be 100644
--- a/libc/include/llvm-libc-types/pthread_spinlock_t.h
+++ b/libc/include/llvm-libc-types/pthread_spinlock_t.h
@@ -8,7 +8,7 @@
 
 #ifndef LLVM_LIBC_TYPES_PTHREAD_SPINLOCK_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_SPINLOCK_T_H
-#include "llvm-libc-types/pid_t.h"
+#include "pid_t.h"
 typedef struct {
   unsigned char __lockword;
   pid_t __owner;
diff --git a/libc/include/llvm-libc-types/pthread_t.h b/libc/include/llvm-libc-types/pthread_t.h
index 63cc0d7dd74cb4..f64887b25225ff 100644
--- a/libc/include/llvm-libc-types/pthread_t.h
+++ b/libc/include/llvm-libc-types/pthread_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_PTHREAD_T_H
 #define LLVM_LIBC_TYPES_PTHREAD_T_H
 
-#include "llvm-libc-types/__thread_type.h"
+#include "__thread_type.h"
 
 typedef __thread_type pthread_t;
 
diff --git a/libc/include/llvm-libc-types/siginfo_t.h b/libc/include/llvm-libc-types/siginfo_t.h
index dafe9c1b5f8ebf..20fdd461bb6df6 100644
--- a/libc/include/llvm-libc-types/siginfo_t.h
+++ b/libc/include/llvm-libc-types/siginfo_t.h
@@ -9,10 +9,10 @@
 #ifndef LLVM_LIBC_TYPES_SIGINFO_T_H
 #define LLVM_LIBC_TYPES_SIGINFO_T_H
 
-#include "llvm-libc-types/clock_t.h"
-#include "llvm-libc-types/pid_t.h"
-#include "llvm-libc-types/uid_t.h"
-#include "llvm-libc-types/union_sigval.h"
+#include "clock_t.h"
+#include "pid_t.h"
+#include "uid_t.h"
+#include "union_sigval.h"
 
 #define SI_MAX_SIZE 128
 
diff --git a/libc/include/llvm-libc-types/sigset_t.h b/libc/include/llvm-libc-types/sigset_t.h
index 5c3e4e6f0431bd..600e9a1cf0456d 100644
--- a/libc/include/llvm-libc-types/sigset_t.h
+++ b/libc/include/llvm-libc-types/sigset_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_SIGSET_T_H
 #define LLVM_LIBC_TYPES_SIGSET_T_H
 
-#include "llvm-libc-macros/signal-macros.h"
+#include "../llvm-libc-macros/signal-macros.h"
 
 // This definition can be adjusted/specialized for different targets and
 // platforms as necessary. This definition works for Linux on most targets.
diff --git a/libc/include/llvm-libc-types/stack_t.h b/libc/include/llvm-libc-types/stack_t.h
index 9156425436e948..92d03058716802 100644
--- a/libc/include/llvm-libc-types/stack_t.h
+++ b/libc/include/llvm-libc-types/stack_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STACK_T_H
 #define LLVM_LIBC_TYPES_STACK_T_H
 
-#include "llvm-libc-types/size_t.h"
+#include "size_t.h"
 
 typedef struct {
   // The order of the fields declared here should match the kernel definition
diff --git a/libc/include/llvm-libc-types/struct_dirent.h b/libc/include/llvm-libc-types/struct_dirent.h
index 0bb71b9f3b84c5..f950869fc77dd1 100644
--- a/libc/include/llvm-libc-types/struct_dirent.h
+++ b/libc/include/llvm-libc-types/struct_dirent.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_DIRENT_H
 #define LLVM_LIBC_TYPES_STRUCT_DIRENT_H
 
-#include "llvm-libc-types/ino_t.h"
-#include "llvm-libc-types/off_t.h"
+#include "ino_t.h"
+#include "off_t.h"
 
 struct dirent {
   ino_t d_ino;
diff --git a/libc/include/llvm-libc-types/struct_epoll_event.h b/libc/include/llvm-libc-types/struct_epoll_event.h
index b7685df20bd7ee..f95fd1a92bc8ef 100644
--- a/libc/include/llvm-libc-types/struct_epoll_event.h
+++ b/libc/include/llvm-libc-types/struct_epoll_event.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_EPOLL_EVENT_H
 #define LLVM_LIBC_TYPES_STRUCT_EPOLL_EVENT_H
 
-#include "llvm-libc-types/struct_epoll_data.h"
+#include "struct_epoll_data.h"
 
 typedef struct
 #ifdef __x86_64__
diff --git a/libc/include/llvm-libc-types/struct_f_owner_ex.h b/libc/include/llvm-libc-types/struct_f_owner_ex.h
index c9cc85f69d2b45..87d4b8988178f4 100644
--- a/libc/include/llvm-libc-types/struct_f_owner_ex.h
+++ b/libc/include/llvm-libc-types/struct_f_owner_ex.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_F_OWNER_EX_H
 #define LLVM_LIBC_TYPES_STRUCT_F_OWNER_EX_H
 
-#include "llvm-libc-types/pid_t.h"
+#include "pid_t.h"
 
 enum pid_type {
   F_OWNER_TID = 0,
diff --git a/libc/include/llvm-libc-types/struct_flock.h b/libc/include/llvm-libc-types/struct_flock.h
index 51c9d27640ea1a..d4bde09045e83c 100644
--- a/libc/include/llvm-libc-types/struct_flock.h
+++ b/libc/include/llvm-libc-types/struct_flock.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_FLOCK_H
 #define LLVM_LIBC_TYPES_STRUCT_FLOCK_H
 
-#include "llvm-libc-types/off_t.h"
-#include "llvm-libc-types/pid_t.h"
+#include "off_t.h"
+#include "pid_t.h"
 
 #include <stdint.h>
 
diff --git a/libc/include/llvm-libc-types/struct_flock64.h b/libc/include/llvm-libc-types/struct_flock64.h
index ac50003ca62f60..8e485d73773848 100644
--- a/libc/include/llvm-libc-types/struct_flock64.h
+++ b/libc/include/llvm-libc-types/struct_flock64.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_FLOCK64_H
 #define LLVM_LIBC_TYPES_STRUCT_FLOCK64_H
 
-#include "llvm-libc-types/off64_t.h"
-#include "llvm-libc-types/pid_t.h"
+#include "off64_t.h"
+#include "pid_t.h"
 
 #include <stdint.h>
 
diff --git a/libc/include/llvm-libc-types/struct_rlimit.h b/libc/include/llvm-libc-types/struct_rlimit.h
index 11e6bee15f9d64..15d8c0e16a640a 100644
--- a/libc/include/llvm-libc-types/struct_rlimit.h
+++ b/libc/include/llvm-libc-types/struct_rlimit.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_RLIMIT_H
 #define LLVM_LIBC_TYPES_STRUCT_RLIMIT_H
 
-#include "llvm-libc-types/rlim_t.h"
+#include "rlim_t.h"
 
 struct rlimit {
   rlim_t rlim_cur;
diff --git a/libc/include/llvm-libc-types/struct_rusage.h b/libc/include/llvm-libc-types/struct_rusage.h
index ed838d30ede3d3..59fe9f7c1d2bc5 100644
--- a/libc/include/llvm-libc-types/struct_rusage.h
+++ b/libc/include/llvm-libc-types/struct_rusage.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_RUSAGE_H
 #define LLVM_LIBC_TYPES_STRUCT_RUSAGE_H
 
-#include "llvm-libc-types/struct_timeval.h"
+#include "struct_timeval.h"
 
 struct rusage {
   struct timeval ru_utime;
diff --git a/libc/include/llvm-libc-types/struct_sched_param.h b/libc/include/llvm-libc-types/struct_sched_param.h
index 86209ac3a1816c..e44a00bc0e87ab 100644
--- a/libc/include/llvm-libc-types/struct_sched_param.h
+++ b/libc/include/llvm-libc-types/struct_sched_param.h
@@ -9,9 +9,9 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_SCHED_PARAM_H
 #define LLVM_LIBC_TYPES_STRUCT_SCHED_PARAM_H
 
-#include "llvm-libc-types/pid_t.h"
-#include "llvm-libc-types/struct_timespec.h"
-#include "llvm-libc-types/time_t.h"
+#include "pid_t.h"
+#include "struct_timespec.h"
+#include "time_t.h"
 
 struct sched_param {
   // Process or thread execution scheduling priority.
diff --git a/libc/include/llvm-libc-types/struct_sigaction.h b/libc/include/llvm-libc-types/struct_sigaction.h
index 945354105f4938..4257cfecd643a4 100644
--- a/libc/include/llvm-libc-types/struct_sigaction.h
+++ b/libc/include/llvm-libc-types/struct_sigaction.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_SIGACTION_H
 #define LLVM_LIBC_TYPES_STRUCT_SIGACTION_H
 
-#include "llvm-libc-types/siginfo_t.h"
-#include "llvm-libc-types/sigset_t.h"
+#include "siginfo_t.h"
+#include "sigset_t.h"
 
 struct sigaction {
   union {
diff --git a/libc/include/llvm-libc-types/struct_sockaddr.h b/libc/include/llvm-libc-types/struct_sockaddr.h
index 0e492452f693c0..b7579e9c6ba73b 100644
--- a/libc/include/llvm-libc-types/struct_sockaddr.h
+++ b/libc/include/llvm-libc-types/struct_sockaddr.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_SOCKADDR_H
 #define LLVM_LIBC_TYPES_STRUCT_SOCKADDR_H
 
-#include "llvm-libc-types/sa_family_t.h"
+#include "sa_family_t.h"
 
 struct sockaddr {
   sa_family_t sa_family;
diff --git a/libc/include/llvm-libc-types/struct_sockaddr_un.h b/libc/include/llvm-libc-types/struct_sockaddr_un.h
index 3c0362ce24fba0..5ed31a49ebb517 100644
--- a/libc/include/llvm-libc-types/struct_sockaddr_un.h
+++ b/libc/include/llvm-libc-types/struct_sockaddr_un.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_SOCKADDR_UN_H
 #define LLVM_LIBC_TYPES_STRUCT_SOCKADDR_UN_H
 
-#include "llvm-libc-types/sa_family_t.h"
+#include "sa_family_t.h"
 
 // This is the sockaddr specialization for AF_UNIX or AF_LOCAL sockets, as
 // defined by posix.
diff --git a/libc/include/llvm-libc-types/struct_stat.h b/libc/include/llvm-libc-types/struct_stat.h
index d8ae9dd6ffdcab..4026679f8d67f0 100644
--- a/libc/include/llvm-libc-types/struct_stat.h
+++ b/libc/include/llvm-libc-types/struct_stat.h
@@ -9,16 +9,16 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_STAT_H
 #define LLVM_LIBC_TYPES_STRUCT_STAT_H
 
-#include "llvm-libc-types/blkcnt_t.h"
-#include "llvm-libc-types/blksize_t.h"
-#include "llvm-libc-types/dev_t.h"
-#include "llvm-libc-types/gid_t.h"
-#include "llvm-libc-types/ino_t.h"
-#include "llvm-libc-types/mode_t.h"
-#include "llvm-libc-types/nlink_t.h"
-#include "llvm-libc-types/off_t.h"
-#include "llvm-libc-types/struct_timespec.h"
-#include "llvm-libc-types/uid_t.h"
+#include "blkcnt_t.h"
+#include "blksize_t.h"
+#include "dev_t.h"
+#include "gid_t.h"
+#include "ino_t.h"
+#include "mode_t.h"
+#include "nlink_t.h"
+#include "off_t.h"
+#include "struct_timespec.h"
+#include "uid_t.h"
 
 struct stat {
   dev_t st_dev;
diff --git a/libc/include/llvm-libc-types/struct_termios.h b/libc/include/llvm-libc-types/struct_termios.h
index 51241192f741f9..e3c5f2809e4398 100644
--- a/libc/include/llvm-libc-types/struct_termios.h
+++ b/libc/include/llvm-libc-types/struct_termios.h
@@ -9,9 +9,9 @@
 #ifndef __LLVM_LIBC_TYPES_STRUCT_TERMIOS_H__
 #define __LLVM_LIBC_TYPES_STRUCT_TERMIOS_H__
 
-#include "llvm-libc-types/cc_t.h"
-#include "llvm-libc-types/speed_t.h"
-#include "llvm-libc-types/tcflag_t.h"
+#include "cc_t.h"
+#include "speed_t.h"
+#include "tcflag_t.h"
 
 struct termios {
   tcflag_t c_iflag; // Input mode flags
diff --git a/libc/include/llvm-libc-types/struct_timespec.h b/libc/include/llvm-libc-types/struct_timespec.h
index 4baab07c10f853..28b5a571f67902 100644
--- a/libc/include/llvm-libc-types/struct_timespec.h
+++ b/libc/include/llvm-libc-types/struct_timespec.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_TIMESPEC_H
 #define LLVM_LIBC_TYPES_STRUCT_TIMESPEC_H
 
-#include "llvm-libc-types/time_t.h"
+#include "time_t.h"
 
 struct timespec {
   time_t tv_sec; /* Seconds.  */
diff --git a/libc/include/llvm-libc-types/struct_timeval.h b/libc/include/llvm-libc-types/struct_timeval.h
index 365b835d345dd3..9595d85a46c8fa 100644
--- a/libc/include/llvm-libc-types/struct_timeval.h
+++ b/libc/include/llvm-libc-types/struct_timeval.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_TIMEVAL_H
 #define LLVM_LIBC_TYPES_STRUCT_TIMEVAL_H
 
-#include "llvm-libc-types/suseconds_t.h"
-#include "llvm-libc-types/time_t.h"
+#include "suseconds_t.h"
+#include "time_t.h"
 
 struct timeval {
   time_t tv_sec;       // Seconds
diff --git a/libc/include/llvm-libc-types/thrd_t.h b/libc/include/llvm-libc-types/thrd_t.h
index 751ea5b9e4c020..d5f31064f2fe56 100644
--- a/libc/include/llvm-libc-types/thrd_t.h
+++ b/libc/include/llvm-libc-types/thrd_t.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_TYPES_THRD_T_H
 #define LLVM_LIBC_TYPES_THRD_T_H
 
-#include "llvm-libc-types/__thread_type.h"
+#include "__thread_type.h"
 
 typedef __thread_type thrd_t;
 
diff --git a/libc/include/sys/auxv.h.def b/libc/include/sys/auxv.h.def
index 11ab25bcfe2c25..d790160e903101 100644
--- a/libc/include/sys/auxv.h.def
+++ b/libc/include/sys/auxv.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-auxv-macros.h"
+#include "../llvm-libc-macros/sys-auxv-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/epoll.h.def b/libc/include/sys/epoll.h.def
index 98d96bf4292510..2240fe46f2afc3 100644
--- a/libc/include/sys/epoll.h.def
+++ b/libc/include/sys/epoll.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-epoll-macros.h"
+#include "../llvm-libc-macros/sys-epoll-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/ioctl.h.def b/libc/include/sys/ioctl.h.def
index 2f37a1190ac11d..133efcdca06b00 100644
--- a/libc/include/sys/ioctl.h.def
+++ b/libc/include/sys/ioctl.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-ioctl-macros.h"
+#include "../llvm-libc-macros/sys-ioctl-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/mman.h.def b/libc/include/sys/mman.h.def
index 2e2c2f1997b834..55f5cb68a200ba 100644
--- a/libc/include/sys/mman.h.def
+++ b/libc/include/sys/mman.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-mman-macros.h"
+#include "../llvm-libc-macros/sys-mman-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/queue.h b/libc/include/sys/queue.h
index cca53c16f0f3c9..fc739b4a253b14 100644
--- a/libc/include/sys/queue.h
+++ b/libc/include/sys/queue.h
@@ -9,6 +9,6 @@
 #ifndef SYS_QUEUE_H
 #define SYS_QUEUE_H
 
-#include "llvm-libc-macros/sys-queue-macros.h"
+#include "../llvm-libc-macros/sys-queue-macros.h"
 
 #endif // SYS_QUEUE_H
diff --git a/libc/include/sys/random.h.def b/libc/include/sys/random.h.def
index d11431b2755d9a..456048f1a818e1 100644
--- a/libc/include/sys/random.h.def
+++ b/libc/include/sys/random.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-random-macros.h"
+#include "../llvm-libc-macros/sys-random-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/resource.h.def b/libc/include/sys/resource.h.def
index 365d803cf7154f..119c47971fb94c 100644
--- a/libc/include/sys/resource.h.def
+++ b/libc/include/sys/resource.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-resource-macros.h"
+#include "../llvm-libc-macros/sys-resource-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/select.h.def b/libc/include/sys/select.h.def
index 529be7158f262c..c9bf382b676af0 100644
--- a/libc/include/sys/select.h.def
+++ b/libc/include/sys/select.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-select-macros.h"
+#include "../llvm-libc-macros/sys-select-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/socket.h.def b/libc/include/sys/socket.h.def
index 933ef1512e4547..54efa1ed4b2edb 100644
--- a/libc/include/sys/socket.h.def
+++ b/libc/include/sys/socket.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-socket-macros.h"
+#include "../llvm-libc-macros/sys-socket-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/stat.h.def b/libc/include/sys/stat.h.def
index 06a98a4aa029c2..4a7d7a02ef0d18 100644
--- a/libc/include/sys/stat.h.def
+++ b/libc/include/sys/stat.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-stat-macros.h"
+#include "../llvm-libc-macros/sys-stat-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/time.h.def b/libc/include/sys/time.h.def
index 5a87139aefc95e..b37555e5849574 100644
--- a/libc/include/sys/time.h.def
+++ b/libc/include/sys/time.h.def
@@ -11,9 +11,9 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-types/struct_timeval.h"
+#include "../llvm-libc-types/struct_timeval.h"
 
-#include "llvm-libc-macros/sys-time-macros.h"
+#include "../llvm-libc-macros/sys-time-macros.h"
 
 %%public_api()
 
diff --git a/libc/include/sys/wait.h.def b/libc/include/sys/wait.h.def
index 0a76da019fdce6..8acf563ebe0987 100644
--- a/libc/include/sys/wait.h.def
+++ b/libc/include/sys/wait.h.def
@@ -11,7 +11,7 @@
 
 #include "__llvm-libc-common.h"
 
-#include "llvm-libc-macros/sys-wait-macros.h"
+#include "../llvm-libc-macros/sys-wait-macros.h"
 
 %%public_api()
 
diff --git a/libc/utils/gpu/loader/Loader.h b/libc/utils/gpu/loader/Loader.h
index 8722f591758259..8be8c0d5f85532 100644
--- a/libc/utils/gpu/loader/Loader.h
+++ b/libc/utils/gpu/loader/Loader.h
@@ -11,8 +11,8 @@
 
 #include "utils/gpu/server/llvmlibc_rpc_server.h"
 
+#include "include/llvm-libc-types/rpc_opcodes_t.h"
 #include "include/llvm-libc-types/test_rpc_opcodes_t.h"
-#include "llvm-libc-types/rpc_opcodes_t.h"
 
 #include <cstddef>
 #include <cstdint>



More information about the libc-commits mailing list