[libc-commits] [libc] [libc] Fixes all guard comments of libc (PR #188701)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 26 08:12:13 PDT 2026
https://github.com/Sukumarsawant updated https://github.com/llvm/llvm-project/pull/188701
>From b489107abc4a31e8aa9586c57f45eff28b9b632c Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 26 Mar 2026 13:17:48 +0530
Subject: [PATCH 1/5] fixex all guard comments of libc
---
libc/hdr/math_function_macros.h | 54 +++++++++----------
libc/hdr/sys_epoll_macros.h | 44 +++++++--------
libc/hdr/types/dl_info.h | 42 +++++++--------
libc/hdr/types/suseconds_t.h | 44 +++++++--------
libc/include/llvm-libc-types/Elf32_Phdr.h | 54 +++++++++----------
libc/include/llvm-libc-types/Elf64_Off.h | 32 +++++------
.../__support/math/exp10_float16_constants.h | 2 +-
libc/src/__support/math/fmabf16.h | 2 +-
8 files changed, 137 insertions(+), 137 deletions(-)
diff --git a/libc/hdr/math_function_macros.h b/libc/hdr/math_function_macros.h
index 48dec8260ef89..597c76e585c52 100644
--- a/libc/hdr/math_function_macros.h
+++ b/libc/hdr/math_function_macros.h
@@ -1,27 +1,27 @@
-//===-- Definition of macros from math.h ----------------------------------===//
-//
-// 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_HDR_MATH_FUNCTION_MACROS_H
-#define LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-macros/math-function-macros.h"
-
-#else // Overlay mode
-
-// GCC will include CXX headers when __cplusplus is defined. This behavior
-// can be suppressed by defining _GLIBCXX_INCLUDE_NEXT_C_HEADERS.
-#if defined(__GNUC__) && !defined(__clang__)
-#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
-#endif
-#include <math.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_MATH_MACROS_H
+//===-- Definition of macros from math.h ----------------------------------===//
+//
+// 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_HDR_MATH_FUNCTION_MACROS_H
+#define LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-macros/math-function-macros.h"
+
+#else // Overlay mode
+
+// GCC will include CXX headers when __cplusplus is defined. This behavior
+// can be suppressed by defining _GLIBCXX_INCLUDE_NEXT_C_HEADERS.
+#if defined(__GNUC__) && !defined(__clang__)
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+#endif
+#include <math.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
diff --git a/libc/hdr/sys_epoll_macros.h b/libc/hdr/sys_epoll_macros.h
index db047f1616343..64534d25bf7c8 100644
--- a/libc/hdr/sys_epoll_macros.h
+++ b/libc/hdr/sys_epoll_macros.h
@@ -1,22 +1,22 @@
-//===-- Definition of macros from sys/epoll.h -----------------------------===//
-//
-// 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_HDR_SYS_EPOLL_MACROS_H
-#define LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-macros/sys-epoll-macros.h"
-
-#else // Overlay mode
-
-#include <sys/epoll.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_SYS/EPOLL_MACROS_H
+//===-- Definition of macros from sys/epoll.h -----------------------------===//
+//
+// 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_HDR_SYS_EPOLL_MACROS_H
+#define LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-macros/sys-epoll-macros.h"
+
+#else // Overlay mode
+
+#include <sys/epoll.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
diff --git a/libc/hdr/types/dl_info.h b/libc/hdr/types/dl_info.h
index c7428319e0597..2ef25a500a12a 100644
--- a/libc/hdr/types/dl_info.h
+++ b/libc/hdr/types/dl_info.h
@@ -1,21 +1,21 @@
-//===-- Proxy for struct timespec ----------------------------------------===//
-//
-// 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_HDR_TYPES_DLINFO_H
-#define LLVM_LIBC_HDR_TYPES_DLINFO_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-types/Dl_info.h"
-
-#else
-
-#include <dlfcn.h>
-
-#endif // LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_TYPES_STRUCT_TIMESPEC_H
+//===-- Proxy for struct timespec ----------------------------------------===//
+//
+// 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_HDR_TYPES_DLINFO_H
+#define LLVM_LIBC_HDR_TYPES_DLINFO_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/Dl_info.h"
+
+#else
+
+#include <dlfcn.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_DLINFO_H
diff --git a/libc/hdr/types/suseconds_t.h b/libc/hdr/types/suseconds_t.h
index f60168c59fb89..7dce43299ea2d 100644
--- a/libc/hdr/types/suseconds_t.h
+++ b/libc/hdr/types/suseconds_t.h
@@ -1,22 +1,22 @@
-//===-- Proxy for suseconds_t ---------------------------------------------===//
-//
-// 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_HDR_TYPES_SUSECONDS_T_H
-#define LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-types/suseconds_t.h"
-
-#else // Overlay mode
-
-#include <sys/types.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // #ifndef LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
+//===-- Proxy for suseconds_t ---------------------------------------------===//
+//
+// 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_HDR_TYPES_SUSECONDS_T_H
+#define LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/suseconds_t.h"
+
+#else // Overlay mode
+
+#include <sys/types.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
diff --git a/libc/include/llvm-libc-types/Elf32_Phdr.h b/libc/include/llvm-libc-types/Elf32_Phdr.h
index 1fcb6d0e18108..61f2ae964bc7b 100644
--- a/libc/include/llvm-libc-types/Elf32_Phdr.h
+++ b/libc/include/llvm-libc-types/Elf32_Phdr.h
@@ -1,27 +1,27 @@
-//===-- Definition of Elf32_Phdr type -------------------------------------===//
-//
-// 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_ELF32_PHDR_H
-#define LLVM_LIBC_TYPES_ELF32_PHDR_H
-
-#include "Elf32_Addr.h"
-#include "Elf32_Off.h"
-#include "Elf32_Word.h"
-
-typedef struct {
- Elf32_Word p_type;
- Elf32_Off p_offset;
- Elf32_Addr p_vaddr;
- Elf32_Addr p_paddr;
- Elf32_Word p_filesz;
- Elf32_Word p_memsz;
- Elf32_Word p_flags;
- Elf32_Word p_align;
-} Elf32_Phdr;
-
-#endif // LLVM_LIBC_TYPES_ELF32_EHDR_H
+//===-- Definition of Elf32_Phdr type -------------------------------------===//
+//
+// 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_ELF32_PHDR_H
+#define LLVM_LIBC_TYPES_ELF32_PHDR_H
+
+#include "Elf32_Addr.h"
+#include "Elf32_Off.h"
+#include "Elf32_Word.h"
+
+typedef struct {
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
+} Elf32_Phdr;
+
+#endif // LLVM_LIBC_TYPES_ELF32_PHDR_H
diff --git a/libc/include/llvm-libc-types/Elf64_Off.h b/libc/include/llvm-libc-types/Elf64_Off.h
index e33c47e658152..c0168e8f61729 100644
--- a/libc/include/llvm-libc-types/Elf64_Off.h
+++ b/libc/include/llvm-libc-types/Elf64_Off.h
@@ -1,16 +1,16 @@
-//===-- Definition of Elf64_Off type --------------------------------------===//
-//
-// 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_ELF64_OFF_H
-#define LLVM_LIBC_TYPES_ELF64_OFF_H
-
-#include "../llvm-libc-macros/stdint-macros.h"
-
-typedef uint64_t Elf64_Off;
-
-#endif // LLVM_LIBC_TYPES_ELF32_OFF_H
+//===-- Definition of Elf64_Off type --------------------------------------===//
+//
+// 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_ELF64_OFF_H
+#define LLVM_LIBC_TYPES_ELF64_OFF_H
+
+#include "../llvm-libc-macros/stdint-macros.h"
+
+typedef uint64_t Elf64_Off;
+
+#endif // LLVM_LIBC_TYPES_ELF64_OFF_H
diff --git a/libc/src/__support/math/exp10_float16_constants.h b/libc/src/__support/math/exp10_float16_constants.h
index cf8bb7f25b41c..e65e50f9fddf8 100644
--- a/libc/src/__support/math/exp10_float16_constants.h
+++ b/libc/src/__support/math/exp10_float16_constants.h
@@ -40,4 +40,4 @@ LIBC_INLINE_VAR constexpr float LOG10F_2 = 0x1.344136p-2f;
#endif // LIBC_TYPES_HAS_FLOAT16
-#endif // LLVM_LIBC_SRC___SUPPORT_MATH_EXP10F16_H
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_EXP10_FLOAT16_CONSTANTS_H
diff --git a/libc/src/__support/math/fmabf16.h b/libc/src/__support/math/fmabf16.h
index f69de4bbd9842..41a99df2d952b 100644
--- a/libc/src/__support/math/fmabf16.h
+++ b/libc/src/__support/math/fmabf16.h
@@ -24,4 +24,4 @@ LIBC_INLINE bfloat16 fmabf16(bfloat16 x, bfloat16 y, bfloat16 z) {
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC___SUPPORT_MATH_FMAXBF16_H
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_FMABF16_H
>From 6814d9e5f4ef1be02ffa9f811bb427cf544e88bd Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 26 Mar 2026 13:19:28 +0530
Subject: [PATCH 2/5] lf
---
libc/hdr/math_function_macros.h | 54 +++++++++++------------
libc/hdr/sys_epoll_macros.h | 44 +++++++++---------
libc/hdr/types/dl_info.h | 42 +++++++++---------
libc/hdr/types/suseconds_t.h | 44 +++++++++---------
libc/include/llvm-libc-types/Elf32_Phdr.h | 54 +++++++++++------------
libc/include/llvm-libc-types/Elf64_Off.h | 32 +++++++-------
6 files changed, 135 insertions(+), 135 deletions(-)
diff --git a/libc/hdr/math_function_macros.h b/libc/hdr/math_function_macros.h
index 597c76e585c52..a15f52e00737f 100644
--- a/libc/hdr/math_function_macros.h
+++ b/libc/hdr/math_function_macros.h
@@ -1,27 +1,27 @@
-//===-- Definition of macros from math.h ----------------------------------===//
-//
-// 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_HDR_MATH_FUNCTION_MACROS_H
-#define LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-macros/math-function-macros.h"
-
-#else // Overlay mode
-
-// GCC will include CXX headers when __cplusplus is defined. This behavior
-// can be suppressed by defining _GLIBCXX_INCLUDE_NEXT_C_HEADERS.
-#if defined(__GNUC__) && !defined(__clang__)
-#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
-#endif
-#include <math.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
+//===-- Definition of macros from math.h ----------------------------------===//
+//
+// 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_HDR_MATH_FUNCTION_MACROS_H
+#define LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-macros/math-function-macros.h"
+
+#else // Overlay mode
+
+// GCC will include CXX headers when __cplusplus is defined. This behavior
+// can be suppressed by defining _GLIBCXX_INCLUDE_NEXT_C_HEADERS.
+#if defined(__GNUC__) && !defined(__clang__)
+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+#endif
+#include <math.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_MATH_FUNCTION_MACROS_H
diff --git a/libc/hdr/sys_epoll_macros.h b/libc/hdr/sys_epoll_macros.h
index 64534d25bf7c8..642484a22e3c5 100644
--- a/libc/hdr/sys_epoll_macros.h
+++ b/libc/hdr/sys_epoll_macros.h
@@ -1,22 +1,22 @@
-//===-- Definition of macros from sys/epoll.h -----------------------------===//
-//
-// 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_HDR_SYS_EPOLL_MACROS_H
-#define LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-macros/sys-epoll-macros.h"
-
-#else // Overlay mode
-
-#include <sys/epoll.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
+//===-- Definition of macros from sys/epoll.h -----------------------------===//
+//
+// 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_HDR_SYS_EPOLL_MACROS_H
+#define LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-macros/sys-epoll-macros.h"
+
+#else // Overlay mode
+
+#include <sys/epoll.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_SYS_EPOLL_MACROS_H
diff --git a/libc/hdr/types/dl_info.h b/libc/hdr/types/dl_info.h
index 2ef25a500a12a..d74dc7969ef6e 100644
--- a/libc/hdr/types/dl_info.h
+++ b/libc/hdr/types/dl_info.h
@@ -1,21 +1,21 @@
-//===-- Proxy for struct timespec ----------------------------------------===//
-//
-// 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_HDR_TYPES_DLINFO_H
-#define LLVM_LIBC_HDR_TYPES_DLINFO_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-types/Dl_info.h"
-
-#else
-
-#include <dlfcn.h>
-
-#endif // LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_TYPES_DLINFO_H
+//===-- Proxy for struct timespec ----------------------------------------===//
+//
+// 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_HDR_TYPES_DLINFO_H
+#define LLVM_LIBC_HDR_TYPES_DLINFO_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/Dl_info.h"
+
+#else
+
+#include <dlfcn.h>
+
+#endif // LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_DLINFO_H
diff --git a/libc/hdr/types/suseconds_t.h b/libc/hdr/types/suseconds_t.h
index 7dce43299ea2d..c10eff90c6ee6 100644
--- a/libc/hdr/types/suseconds_t.h
+++ b/libc/hdr/types/suseconds_t.h
@@ -1,22 +1,22 @@
-//===-- Proxy for suseconds_t ---------------------------------------------===//
-//
-// 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_HDR_TYPES_SUSECONDS_T_H
-#define LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
-
-#ifdef LIBC_FULL_BUILD
-
-#include "include/llvm-libc-types/suseconds_t.h"
-
-#else // Overlay mode
-
-#include <sys/types.h>
-
-#endif // LLVM_LIBC_FULL_BUILD
-
-#endif // LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
+//===-- Proxy for suseconds_t ---------------------------------------------===//
+//
+// 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_HDR_TYPES_SUSECONDS_T_H
+#define LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
+
+#ifdef LIBC_FULL_BUILD
+
+#include "include/llvm-libc-types/suseconds_t.h"
+
+#else // Overlay mode
+
+#include <sys/types.h>
+
+#endif // LLVM_LIBC_FULL_BUILD
+
+#endif // LLVM_LIBC_HDR_TYPES_SUSECONDS_T_H
diff --git a/libc/include/llvm-libc-types/Elf32_Phdr.h b/libc/include/llvm-libc-types/Elf32_Phdr.h
index 61f2ae964bc7b..6a5aae7e7235c 100644
--- a/libc/include/llvm-libc-types/Elf32_Phdr.h
+++ b/libc/include/llvm-libc-types/Elf32_Phdr.h
@@ -1,27 +1,27 @@
-//===-- Definition of Elf32_Phdr type -------------------------------------===//
-//
-// 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_ELF32_PHDR_H
-#define LLVM_LIBC_TYPES_ELF32_PHDR_H
-
-#include "Elf32_Addr.h"
-#include "Elf32_Off.h"
-#include "Elf32_Word.h"
-
-typedef struct {
- Elf32_Word p_type;
- Elf32_Off p_offset;
- Elf32_Addr p_vaddr;
- Elf32_Addr p_paddr;
- Elf32_Word p_filesz;
- Elf32_Word p_memsz;
- Elf32_Word p_flags;
- Elf32_Word p_align;
-} Elf32_Phdr;
-
-#endif // LLVM_LIBC_TYPES_ELF32_PHDR_H
+//===-- Definition of Elf32_Phdr type -------------------------------------===//
+//
+// 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_ELF32_PHDR_H
+#define LLVM_LIBC_TYPES_ELF32_PHDR_H
+
+#include "Elf32_Addr.h"
+#include "Elf32_Off.h"
+#include "Elf32_Word.h"
+
+typedef struct {
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
+} Elf32_Phdr;
+
+#endif // LLVM_LIBC_TYPES_ELF32_PHDR_H
diff --git a/libc/include/llvm-libc-types/Elf64_Off.h b/libc/include/llvm-libc-types/Elf64_Off.h
index c0168e8f61729..8a3e49f2ed1b8 100644
--- a/libc/include/llvm-libc-types/Elf64_Off.h
+++ b/libc/include/llvm-libc-types/Elf64_Off.h
@@ -1,16 +1,16 @@
-//===-- Definition of Elf64_Off type --------------------------------------===//
-//
-// 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_ELF64_OFF_H
-#define LLVM_LIBC_TYPES_ELF64_OFF_H
-
-#include "../llvm-libc-macros/stdint-macros.h"
-
-typedef uint64_t Elf64_Off;
-
-#endif // LLVM_LIBC_TYPES_ELF64_OFF_H
+//===-- Definition of Elf64_Off type --------------------------------------===//
+//
+// 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_ELF64_OFF_H
+#define LLVM_LIBC_TYPES_ELF64_OFF_H
+
+#include "../llvm-libc-macros/stdint-macros.h"
+
+typedef uint64_t Elf64_Off;
+
+#endif // LLVM_LIBC_TYPES_ELF64_OFF_H
>From 924eb02c3c13f848b4d8ddcd8a68aa91896c3c6d Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 26 Mar 2026 13:34:57 +0530
Subject: [PATCH 3/5] remaining
---
libc/src/__support/frac128.h | 2 +-
libc/src/__support/threads/CndVar.h | 2 +-
libc/src/__support/threads/unix_mutex.h | 2 +-
libc/src/math/fminimum_mag_num.h | 2 +-
libc/src/math/powi.h | 2 +-
libc/src/math/powif.h | 2 +-
libc/src/math/setpayloadsigl.h | 2 +-
libc/src/math/totalordermagl.h | 2 +-
libc/src/stdlib/memalignment.h | 2 +-
.../string/memory_utils/arm/inline_memset.h | 2 +-
libc/src/unistd/fpathconf.h | 40 +++++++++----------
libc/src/unistd/linux/pathconf_utils.h | 2 +-
libc/src/unistd/pathconf.h | 2 +-
.../test/src/math/performance_testing/Timer.h | 2 +-
14 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/libc/src/__support/frac128.h b/libc/src/__support/frac128.h
index 0e19eb32676c0..037efd46f3837 100644
--- a/libc/src/__support/frac128.h
+++ b/libc/src/__support/frac128.h
@@ -57,4 +57,4 @@ struct Frac128 : public UInt<128> {
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC___SUPPORT_UINT128_H
+#endif // LLVM_LIBC_SRC___SUPPORT_FRAC128_H
diff --git a/libc/src/__support/threads/CndVar.h b/libc/src/__support/threads/CndVar.h
index 901b652c553d8..406bcf193704e 100644
--- a/libc/src/__support/threads/CndVar.h
+++ b/libc/src/__support/threads/CndVar.h
@@ -51,4 +51,4 @@ class CndVar {
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC___SUPPORT_THREADS_LINUX_CNDVAR_H
+#endif // LLVM_LIBC___SUPPORT_SRC_THREADS_LINUX_CNDVAR_H
diff --git a/libc/src/__support/threads/unix_mutex.h b/libc/src/__support/threads/unix_mutex.h
index 626cee9d0913d..aaaa931efe310 100644
--- a/libc/src/__support/threads/unix_mutex.h
+++ b/libc/src/__support/threads/unix_mutex.h
@@ -86,4 +86,4 @@ class Mutex final : private RawMutex {
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC___SUPPORT_THREADS_LINUX_MUTEX_H
+#endif // LLVM_LIBC_SRC___SUPPORT_THREADS_UNIX_MUTEX_H
diff --git a/libc/src/math/fminimum_mag_num.h b/libc/src/math/fminimum_mag_num.h
index c4464343338dc..3a9136fd8fb04 100644
--- a/libc/src/math/fminimum_mag_num.h
+++ b/libc/src/math/fminimum_mag_num.h
@@ -18,4 +18,4 @@ double fminimum_mag_num(double x, double y);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUMH
+#endif // LLVM_LIBC_SRC_MATH_FMINIMUM_MAG_NUM_H
diff --git a/libc/src/math/powi.h b/libc/src/math/powi.h
index a70fab62b85cb..0aa1b5eb676ec 100644
--- a/libc/src/math/powi.h
+++ b/libc/src/math/powi.h
@@ -17,4 +17,4 @@ double powi(double x, int y);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_MATH_POW_H
+#endif // LLVM_LIBC_SRC_MATH_POWI_H
diff --git a/libc/src/math/powif.h b/libc/src/math/powif.h
index ee6716f2a1846..f4dadab956fef 100644
--- a/libc/src/math/powif.h
+++ b/libc/src/math/powif.h
@@ -17,4 +17,4 @@ float powif(float x, int y);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_MATH_POW_H
+#endif // LLVM_LIBC_SRC_MATH_POWIF_H
diff --git a/libc/src/math/setpayloadsigl.h b/libc/src/math/setpayloadsigl.h
index 9bc47eed90197..7fc9619c5e3cd 100644
--- a/libc/src/math/setpayloadsigl.h
+++ b/libc/src/math/setpayloadsigl.h
@@ -17,4 +17,4 @@ int setpayloadsigl(long double *res, long double pl);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_MATH_SETPAYLOADSIGF_H
+#endif // LLVM_LIBC_SRC_MATH_SETPAYLOADSIGL_H
diff --git a/libc/src/math/totalordermagl.h b/libc/src/math/totalordermagl.h
index 64d27f1566877..eadcea2229a42 100644
--- a/libc/src/math/totalordermagl.h
+++ b/libc/src/math/totalordermagl.h
@@ -17,4 +17,4 @@ int totalordermagl(const long double *x, const long double *y);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGl_H
+#endif // LLVM_LIBC_SRC_MATH_TOTALORDERMAGL_H
diff --git a/libc/src/stdlib/memalignment.h b/libc/src/stdlib/memalignment.h
index b7c7430af8c8e..2621ea55ebdd7 100644
--- a/libc/src/stdlib/memalignment.h
+++ b/libc/src/stdlib/memalignment.h
@@ -18,4 +18,4 @@ size_t memalignment(const void *p);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STDLIB_LDIV_H
+#endif // LLVM_LIBC_SRC_STDLIB_MEM_ALIGNMENT_H
diff --git a/libc/src/string/memory_utils/arm/inline_memset.h b/libc/src/string/memory_utils/arm/inline_memset.h
index a7ef9cc7df916..ce36e40617bb1 100644
--- a/libc/src/string/memory_utils/arm/inline_memset.h
+++ b/libc/src/string/memory_utils/arm/inline_memset.h
@@ -153,4 +153,4 @@ inline_memset_arm_dispatch(Ptr dst, uint8_t value, size_t size) {
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ARM_INLINE_MEMCPY_H
+#endif // LLVM_LIBC_SRC_STRING_MEMORY_UTILS_ARM_INLINE_MEMSET_H
diff --git a/libc/src/unistd/fpathconf.h b/libc/src/unistd/fpathconf.h
index 610e2429123e5..fb611324b2c46 100644
--- a/libc/src/unistd/fpathconf.h
+++ b/libc/src/unistd/fpathconf.h
@@ -1,20 +1,20 @@
-//===-- Implementation header for fpathconf ---------------------*- C++ -*-===//
-//
-// 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_SRC_UNISTD_FPATHCONF_H
-#define LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-long fpathconf(int fd, int name);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_UNISTD_FSYNC_H
+//===-- Implementation header for fpathconf ---------------------*- C++ -*-===//
+//
+// 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_SRC_UNISTD_FPATHCONF_H
+#define LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+long fpathconf(int fd, int name);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
diff --git a/libc/src/unistd/linux/pathconf_utils.h b/libc/src/unistd/linux/pathconf_utils.h
index bd34de23cc38e..8487802c09dca 100644
--- a/libc/src/unistd/linux/pathconf_utils.h
+++ b/libc/src/unistd/linux/pathconf_utils.h
@@ -18,4 +18,4 @@ long pathconfig(const statfs_utils::LinuxStatFs &s, int name);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_UNISTD_PREAD_H
+#endif // LLVM_LIBC_SRC_UNISTD_PATHCONF_UTILS_H
diff --git a/libc/src/unistd/pathconf.h b/libc/src/unistd/pathconf.h
index d6b891ea8be68..e2dd484960822 100644
--- a/libc/src/unistd/pathconf.h
+++ b/libc/src/unistd/pathconf.h
@@ -17,4 +17,4 @@ long pathconf(const char *path, int name);
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_SRC_UNISTD_PREAD_H
+#endif // LLVM_LIBC_SRC_UNISTD_PATHCONF_H
diff --git a/libc/test/src/math/performance_testing/Timer.h b/libc/test/src/math/performance_testing/Timer.h
index f75c1f0285e4b..31deeb3c53d79 100644
--- a/libc/test/src/math/performance_testing/Timer.h
+++ b/libc/test/src/math/performance_testing/Timer.h
@@ -31,4 +31,4 @@ class Timer {
} // namespace testing
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H
+#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H
>From 2386531876520f927b2db41690bcea7ff4e2d0f2 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 26 Mar 2026 13:36:03 +0530
Subject: [PATCH 4/5] lf
---
libc/src/unistd/fpathconf.h | 40 ++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/libc/src/unistd/fpathconf.h b/libc/src/unistd/fpathconf.h
index fb611324b2c46..e6a3b16948f40 100644
--- a/libc/src/unistd/fpathconf.h
+++ b/libc/src/unistd/fpathconf.h
@@ -1,20 +1,20 @@
-//===-- Implementation header for fpathconf ---------------------*- C++ -*-===//
-//
-// 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_SRC_UNISTD_FPATHCONF_H
-#define LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-long fpathconf(int fd, int name);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
+//===-- Implementation header for fpathconf ---------------------*- C++ -*-===//
+//
+// 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_SRC_UNISTD_FPATHCONF_H
+#define LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+long fpathconf(int fd, int name);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_UNISTD_FPATHCONF_H
>From 97c3525acdbe0fe8739c36f90f3078e4974f6bca Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 26 Mar 2026 20:41:23 +0530
Subject: [PATCH 5/5] nit
---
libc/test/src/math/performance_testing/Timer.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libc/test/src/math/performance_testing/Timer.h b/libc/test/src/math/performance_testing/Timer.h
index 31deeb3c53d79..d39372522bf83 100644
--- a/libc/test/src/math/performance_testing/Timer.h
+++ b/libc/test/src/math/performance_testing/Timer.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H
-#define LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H
+#ifndef LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H
+#define LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H
#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
@@ -31,4 +31,4 @@ class Timer {
} // namespace testing
} // namespace LIBC_NAMESPACE_DECL
-#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H
+#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H
More information about the libc-commits
mailing list