[libc-commits] [libc] [libc] fix most clang-tidy llvm-header-guard warnings (PR #83319)

via libc-commits libc-commits at lists.llvm.org
Wed Feb 28 11:12:48 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

<details>
<summary>Changes</summary>

To filter just these warnings:
    $ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard

To automatically apply fixits:
    $ find libc/src libc/include libc/test -name \*.h | \
      xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \
        -checks='-*,llvm-header-guard' --fix --quiet

Some manual cleanup is still necessary as headers that were missing header
guards outright will have them inserted before the license block (we prefer
them after).

There's a few remaining llvm-header-guard warning I'm tracking down separately
and will have a separate PR for those.


---

Patch is 155.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/83319.diff


211 Files Affected:

- (modified) libc/include/__llvm-libc-common.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/containerof-macro.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/fcntl-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/features-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/fenv-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/file-seek-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/float-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/generic-error-number-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/gpu/time-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/inttypes-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/limits-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/fcntl-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sched-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/signal-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-random-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-resource-macros.h (+5) 
- (modified) libc/include/llvm-libc-macros/linux/sys-socket-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-stat-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-time-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/sys-wait-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/termios-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/time-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/linux/unistd-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/math-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/null-macro.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/offsetof-macro.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sched-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/signal-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/stdckdint-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/stdfix-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/stdio-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/stdlib-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-auxv-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-ioctl-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-mman-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-queue-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-random-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-resource-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-select-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-socket-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-stat-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-time-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/sys-wait-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/termios-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/time-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/unistd-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-macros/wchar-macros.h (+3-3) 
- (modified) libc/include/llvm-libc-types/ACTION.h (+3-3) 
- (modified) libc/include/llvm-libc-types/DIR.h (+3-3) 
- (modified) libc/include/llvm-libc-types/ENTRY.h (+3-3) 
- (modified) libc/include/llvm-libc-types/FILE.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__atexithandler_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__atfork_callback_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__bsearchcompare_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__call_once_func_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__exec_argv_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__exec_envp_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__futex_word.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__getoptargv_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__mutex_type.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__pthread_once_func_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__pthread_start_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__pthread_tss_dtor_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__qsortcompare_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__qsortrcompare_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__sighandler_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/__thread_type.h (+3-3) 
- (modified) libc/include/llvm-libc-types/blkcnt_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/blksize_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/cc_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/clock_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/clockid_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/cnd_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/cookie_io_functions_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/cpu_set_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/dev_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/div_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/double_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/fd_set.h (+3-3) 
- (modified) libc/include/llvm-libc-types/fenv_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/fexcept_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/float128.h (+3-3) 
- (modified) libc/include/llvm-libc-types/float_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/gid_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/ino_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/jmp_buf.h (+3-3) 
- (modified) libc/include/llvm-libc-types/ldiv_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/lldiv_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/mode_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/mtx_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/nlink_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/off64_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/off_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/once_flag.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pid_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/posix_spawn_file_actions_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/posix_spawnattr_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_attr_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_key_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_mutex_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_mutexattr_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_once_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/pthread_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/rlim_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/rpc_opcodes_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/sa_family_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/sig_atomic_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/siginfo_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/sigset_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/size_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/socklen_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/speed_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/ssize_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/stack_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_dirent.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_epoll_data.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_epoll_event.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_hsearch_data.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_rlimit.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_rusage.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_sched_param.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_sigaction.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_sockaddr.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_sockaddr_un.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_stat.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_timespec.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_timeval.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_tm.h (+3-3) 
- (modified) libc/include/llvm-libc-types/struct_utsname.h (+3-3) 
- (modified) libc/include/llvm-libc-types/suseconds_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/tcflag_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/test_rpc_opcodes_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/thrd_start_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/thrd_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/time_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/tss_dtor_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/tss_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/uid_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/union_sigval.h (+3-3) 
- (modified) libc/include/llvm-libc-types/wchar_t.h (+3-3) 
- (modified) libc/include/llvm-libc-types/wint_t.h (+3-3) 
- (modified) libc/include/sys/queue.h (+3-3) 
- (modified) libc/src/__support/CPP/type_traits/is_fixed_point.h (+1-1) 
- (modified) libc/src/__support/FPUtil/fpbits_str.h (+3-3) 
- (modified) libc/src/__support/GPU/generic/utils.h (+3-3) 
- (modified) libc/src/__support/GPU/utils.h (+3-3) 
- (modified) libc/src/__support/HashTable/table.h (+3-3) 
- (modified) libc/src/__support/OSUtil/gpu/io.h (+1-1) 
- (modified) libc/src/__support/RPC/rpc_util.h (+3-3) 
- (modified) libc/src/__support/StringUtil/message_mapper.h (+3-3) 
- (modified) libc/src/__support/StringUtil/platform_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/platform_signals.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/linux_extension_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/linux_extension_signals.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/linux_platform_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/linux_platform_signals.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/minimal_platform_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/minimal_platform_signals.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/posix_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/posix_signals.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/signal_table.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/stdc_errors.h (+3-3) 
- (modified) libc/src/__support/StringUtil/tables/stdc_signals.h (+3-3) 
- (modified) libc/src/__support/fixed_point/fx_bits.h (+3-3) 
- (modified) libc/src/__support/fixed_point/fx_rep.h (+3-3) 
- (modified) libc/src/__support/fixed_point/sqrt.h (+3-3) 
- (modified) libc/src/__support/memory_size.h (+5) 
- (modified) libc/src/__support/threads/gpu/mutex.h (+3-3) 
- (modified) libc/src/assert/assert.h (+6-1) 
- (modified) libc/src/gpu/rpc_host_call.h (+1-1) 
- (modified) libc/src/math/amdgpu/declarations.h (+3-3) 
- (modified) libc/src/math/amdgpu/platform.h (+3-3) 
- (modified) libc/src/math/copysignf128.h (+1-1) 
- (modified) libc/src/math/generic/exp_utils.h (+3-3) 
- (modified) libc/src/math/nvptx/declarations.h (+3-3) 
- (modified) libc/src/math/nvptx/nvptx.h (+3-3) 
- (modified) libc/src/search/hsearch/global.h (+5) 
- (modified) libc/src/string/memory_utils/aarch64/inline_memcpy.h (+3-3) 
- (modified) libc/src/string/memory_utils/riscv/inline_memmove.h (+3-3) 
- (modified) libc/test/UnitTest/ExecuteFunction.h (+3-3) 
- (modified) libc/test/UnitTest/FPExceptMatcher.h (+3-3) 
- (modified) libc/test/UnitTest/FPMatcher.h (+3-3) 
- (modified) libc/test/UnitTest/LibcTest.h (+3-3) 
- (modified) libc/test/UnitTest/MemoryMatcher.h (+3-3) 
- (modified) libc/test/UnitTest/PlatformDefs.h (+3-3) 
- (modified) libc/test/UnitTest/RoundingModeUtils.h (+3-3) 
- (modified) libc/test/UnitTest/StringUtils.h (+3-3) 
- (modified) libc/test/UnitTest/Test.h (+3-3) 
- (modified) libc/test/integration/src/spawn/test_binary_properties.h (+3-3) 
- (modified) libc/test/src/math/FAbsTest.h (+5) 
- (modified) libc/test/src/math/FMaxTest.h (+5) 
- (modified) libc/test/src/math/FMinTest.h (+5) 
- (modified) libc/test/src/math/FloorTest.h (+5) 
- (modified) libc/test/src/math/RandUtils.h (+5) 
- (modified) libc/test/src/math/RoundTest.h (+5) 
- (modified) libc/test/src/math/TruncTest.h (+5) 
- (modified) libc/test/src/math/differential_testing/Timer.h (+3-3) 
- (modified) libc/test/src/math/in_float_range_test_helper.h (+3-3) 
- (modified) libc/test/src/math/smoke/CeilTest.h (+5) 
- (modified) libc/test/src/math/smoke/CopySignTest.h (+5) 
- (modified) libc/test/src/math/smoke/FAbsTest.h (+5) 
- (modified) libc/test/src/math/smoke/FMaxTest.h (+5) 
- (modified) libc/test/src/math/smoke/FMinTest.h (+5) 
- (modified) libc/test/src/math/smoke/FloorTest.h (+5) 
- (modified) libc/test/src/math/smoke/RIntTest.h (+3-3) 
- (modified) libc/test/src/math/smoke/RoundTest.h (+5) 
- (modified) libc/test/src/math/smoke/RoundToIntegerTest.h (+3-3) 
- (modified) libc/test/src/math/smoke/TruncTest.h (+5) 
- (modified) libc/test/src/time/TmHelper.h (+3-3) 
- (modified) libc/utils/MPFRWrapper/MPFRUtils.h (+3-3) 


``````````diff
diff --git a/libc/include/__llvm-libc-common.h b/libc/include/__llvm-libc-common.h
index 6b883ee21a8c49..3af0b08e9e8668 100644
--- a/libc/include/__llvm-libc-common.h
+++ b/libc/include/__llvm-libc-common.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC___COMMON_H
-#define LLVM_LIBC___COMMON_H
+#ifndef LLVM_LIBC_COMMON_H
+#define LLVM_LIBC_COMMON_H
 
 #ifdef __cplusplus
 
@@ -51,4 +51,4 @@
 
 #endif // __cplusplus
 
-#endif // LLVM_LIBC___COMMON_H
+#endif // LLVM_LIBC_COMMON_H
diff --git a/libc/include/llvm-libc-macros/containerof-macro.h b/libc/include/llvm-libc-macros/containerof-macro.h
index ea91fa7097a4f2..62724abd3b0f11 100644
--- a/libc/include/llvm-libc-macros/containerof-macro.h
+++ b/libc/include/llvm-libc-macros/containerof-macro.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
-#define __LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
+#ifndef LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
+#define LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
 
 #include <llvm-libc-macros/offsetof-macro.h>
 
@@ -17,4 +17,4 @@
     (type *)(void *)((const char *)__ptr - offsetof(type, member));            \
   })
 
-#endif // __LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
+#endif // LLVM_LIBC_MACROS_CONTAINEROF_MACRO_H
diff --git a/libc/include/llvm-libc-macros/fcntl-macros.h b/libc/include/llvm-libc-macros/fcntl-macros.h
index 448dcc0a813536..4bd03a7e3e2b29 100644
--- a/libc/include/llvm-libc-macros/fcntl-macros.h
+++ b/libc/include/llvm-libc-macros/fcntl-macros.h
@@ -1,8 +1,8 @@
-#ifndef __LLVM_LIBC_MACROS_FCNTL_MACROS_H
-#define __LLVM_LIBC_MACROS_FCNTL_MACROS_H
+#ifndef LLVM_LIBC_MACROS_FCNTL_MACROS_H
+#define LLVM_LIBC_MACROS_FCNTL_MACROS_H
 
 #ifdef __linux__
 #include "linux/fcntl-macros.h"
 #endif
 
-#endif // __LLVM_LIBC_MACROS_FCNTL_MACROS_H
+#endif // LLVM_LIBC_MACROS_FCNTL_MACROS_H
diff --git a/libc/include/llvm-libc-macros/features-macros.h b/libc/include/llvm-libc-macros/features-macros.h
index 2938b3ccb95b29..5bc87a68fc0ba8 100644
--- a/libc/include/llvm-libc-macros/features-macros.h
+++ b/libc/include/llvm-libc-macros/features-macros.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_FEATURES_MACROS_H
-#define __LLVM_LIBC_MACROS_FEATURES_MACROS_H
+#ifndef LLVM_LIBC_MACROS_FEATURES_MACROS_H
+#define LLVM_LIBC_MACROS_FEATURES_MACROS_H
 
 #define __LLVM_LIBC__ 1
 
-#endif // __LLVM_LIBC_MACROS_FEATURES_MACROS_H
+#endif // LLVM_LIBC_MACROS_FEATURES_MACROS_H
diff --git a/libc/include/llvm-libc-macros/fenv-macros.h b/libc/include/llvm-libc-macros/fenv-macros.h
index cc0ea344b1702b..72ac660cd98cba 100644
--- a/libc/include/llvm-libc-macros/fenv-macros.h
+++ b/libc/include/llvm-libc-macros/fenv-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_FENV_MACROS_H
-#define __LLVM_LIBC_MACROS_FENV_MACROS_H
+#ifndef LLVM_LIBC_MACROS_FENV_MACROS_H
+#define LLVM_LIBC_MACROS_FENV_MACROS_H
 
 #define FE_DIVBYZERO 1
 #define FE_INEXACT 2
@@ -24,4 +24,4 @@
 
 #define FE_DFL_ENV ((fenv_t *)-1)
 
-#endif // __LLVM_LIBC_MACROS_FENV_MACROS_H
+#endif // LLVM_LIBC_MACROS_FENV_MACROS_H
diff --git a/libc/include/llvm-libc-macros/file-seek-macros.h b/libc/include/llvm-libc-macros/file-seek-macros.h
index 04f397982f460d..676cb7511407ff 100644
--- a/libc/include/llvm-libc-macros/file-seek-macros.h
+++ b/libc/include/llvm-libc-macros/file-seek-macros.h
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
-#define __LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
+#ifndef LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
+#define LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
 
 #define SEEK_SET 0
 #define SEEK_CUR 1
 #define SEEK_END 2
 
-#endif // __LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
+#endif // LLVM_LIBC_MACROS_FILE_SEEK_MACROS_H
diff --git a/libc/include/llvm-libc-macros/float-macros.h b/libc/include/llvm-libc-macros/float-macros.h
index 86ec4939393086..a51eab0c7ed2f3 100644
--- a/libc/include/llvm-libc-macros/float-macros.h
+++ b/libc/include/llvm-libc-macros/float-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_FLOAT_MACROS_H
-#define __LLVM_LIBC_MACROS_FLOAT_MACROS_H
+#ifndef LLVM_LIBC_MACROS_FLOAT_MACROS_H
+#define LLVM_LIBC_MACROS_FLOAT_MACROS_H
 
 // Suppress `#include_next is a language extension` warnings.
 #ifdef __clang__
@@ -169,4 +169,4 @@
 
 // TODO: Add FLT16 and FLT128 constants.
 
-#endif // __LLVM_LIBC_MACROS_FLOAT_MACROS_H
+#endif // LLVM_LIBC_MACROS_FLOAT_MACROS_H
diff --git a/libc/include/llvm-libc-macros/generic-error-number-macros.h b/libc/include/llvm-libc-macros/generic-error-number-macros.h
index 3805c95cbb2a5c..7ee0352669b8a9 100644
--- a/libc/include/llvm-libc-macros/generic-error-number-macros.h
+++ b/libc/include/llvm-libc-macros/generic-error-number-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
-#define __LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
+#ifndef LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
+#define LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
 
 #define EPERM 1
 #define ENOENT 2
@@ -45,4 +45,4 @@
 #define ERANGE 34
 #define EILSEQ 35
 
-#endif // __LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
+#endif // LLVM_LIBC_MACROS_GENERIC_ERROR_NUMBER_MACROS_H
diff --git a/libc/include/llvm-libc-macros/gpu/time-macros.h b/libc/include/llvm-libc-macros/gpu/time-macros.h
index baf2ea5f41324f..c3dc812f90a3be 100644
--- a/libc/include/llvm-libc-macros/gpu/time-macros.h
+++ b/libc/include/llvm-libc-macros/gpu/time-macros.h
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
-#define __LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
+#ifndef LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
+#define LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
 
 #define CLOCKS_PER_SEC 1000000
 
-#endif // __LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
+#endif // LLVM_LIBC_MACROS_GPU_TIME_MACROS_H
diff --git a/libc/include/llvm-libc-macros/inttypes-macros.h b/libc/include/llvm-libc-macros/inttypes-macros.h
index fc3e2517f19471..8e7d4f558a63b6 100644
--- a/libc/include/llvm-libc-macros/inttypes-macros.h
+++ b/libc/include/llvm-libc-macros/inttypes-macros.h
@@ -5,8 +5,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef __LLVM_LIBC_MACROS_INTTYPES_MACROS_H
-#define __LLVM_LIBC_MACROS_INTTYPES_MACROS_H
+#ifndef LLVM_LIBC_MACROS_INTTYPES_MACROS_H
+#define LLVM_LIBC_MACROS_INTTYPES_MACROS_H
 
 // fprintf/scanf format macros.
 // POSIX.1-2008, Technical Corrigendum 1, XBD/TC1-2008/0050 [211] is applied.
@@ -286,4 +286,4 @@
 #define SCNxMAX __UINTMAX_FMTx__
 #define SCNxPTR __UINTPTR_FMTx__
 
-#endif // __LLVM_LIBC_MACROS_INTTYPES_MACROS_H
+#endif // LLVM_LIBC_MACROS_INTTYPES_MACROS_H
diff --git a/libc/include/llvm-libc-macros/limits-macros.h b/libc/include/llvm-libc-macros/limits-macros.h
index 3b4df58ae4a143..95f0f5f0baa58e 100644
--- a/libc/include/llvm-libc-macros/limits-macros.h
+++ b/libc/include/llvm-libc-macros/limits-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LIMITS_MACROS_H
-#define __LLVM_LIBC_MACROS_LIMITS_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LIMITS_MACROS_H
+#define LLVM_LIBC_MACROS_LIMITS_MACROS_H
 
 // Define all C23 macro constants of limits.h
 
@@ -225,4 +225,4 @@
 #define ULLONG_MIN 0ULL
 #endif // ULLONG_MIN
 
-#endif // __LLVM_LIBC_MACROS_LIMITS_MACROS_H
+#endif // LLVM_LIBC_MACROS_LIMITS_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/fcntl-macros.h b/libc/include/llvm-libc-macros/linux/fcntl-macros.h
index 495c5ec780edb0..1d4e5bbbdc770a 100644
--- a/libc/include/llvm-libc-macros/linux/fcntl-macros.h
+++ b/libc/include/llvm-libc-macros/linux/fcntl-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
 
 // File creation flags
 #define O_CLOEXEC 02000000
@@ -68,4 +68,4 @@
 #define F_GETFL 3
 #define F_SETFL 4
 
-#endif // __LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_FCNTL_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sched-macros.h b/libc/include/llvm-libc-macros/linux/sched-macros.h
index 0c574440ccbcf7..ace620049ca0c6 100644
--- a/libc/include/llvm-libc-macros/linux/sched-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sched-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
 
 // Definitions of SCHED_* macros must match was linux as at:
 // https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/sched.h
@@ -26,4 +26,4 @@
 #define CPU_COUNT_S(setsize, set) __sched_getcpucount(setsize, set)
 #define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set)
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SCHED_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h
index deb190ec375998..e379fc41efd02f 100644
--- a/libc/include/llvm-libc-macros/linux/signal-macros.h
+++ b/libc/include/llvm-libc-macros/linux/signal-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SIGNUM_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SIGNUM_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
 
 #define SIGHUP 1
 #define SIGINT 2
@@ -101,4 +101,4 @@
 #define CLD_STOPPED 5   // child has stopped
 #define CLD_CONTINUED 6 // stopped child has continued
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SIGNUM_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SIGNAL_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h b/libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h
index 8f13a0ef4ad305..5eb779aeeca561 100644
--- a/libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
 
 // TODO (michaelrj): Finish defining these macros.
 // Just defining this macro for the moment since it's all that we need right
@@ -16,4 +16,4 @@
 // think is worth digging into right now.
 #define TIOCGETD 0x5424
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_IOCTL_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-random-macros.h b/libc/include/llvm-libc-macros/linux/sys-random-macros.h
index 1337f8b606fcf8..9261e87bdbf6f6 100644
--- a/libc/include/llvm-libc-macros/linux/sys-random-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-random-macros.h
@@ -6,12 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
 
 // Getrandom flags
 #define GRND_RANDOM 0x0001
 #define GRND_NONBLOCK 0x0002
 #define GRND_INSECURE 0x0004
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_RANDOM_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-resource-macros.h b/libc/include/llvm-libc-macros/linux/sys-resource-macros.h
index dd265530ada26c..c9d93c30c35a41 100644
--- a/libc/include/llvm-libc-macros/linux/sys-resource-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-resource-macros.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_RESOURCE_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_RESOURCE_MACROS_H
+
 #define RLIMIT_CPU 0
 #define RLIMIT_FSIZE 1
 #define RLIMIT_DATA 2
@@ -24,3 +27,5 @@
 #define RLIMIT_RTTIME 15
 
 #define RLIM_INFINITY (~0UL)
+
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_RESOURCE_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-socket-macros.h b/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
index 7de410225b7126..f335200a103bb0 100644
--- a/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-socket-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
 
 // IEEE Std 1003.1-2017 - basedefs/sys_socket.h.html
 // Macro values come from the Linux syscall interface.
@@ -25,4 +25,4 @@
 #define SOCK_SEQPACKET 5
 #define SOCK_PACKET 10
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_SOCKET_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-stat-macros.h b/libc/include/llvm-libc-macros/linux/sys-stat-macros.h
index 48606cfa08ce93..3013121d0f3cb3 100644
--- a/libc/include/llvm-libc-macros/linux/sys-stat-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-stat-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
 
 // Definitions from linux/stat.h
 #define S_IFMT 0170000
@@ -45,4 +45,4 @@
 #define S_IWOTH 00002
 #define S_IXOTH 00001
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_STAT_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-time-macros.h b/libc/include/llvm-libc-macros/linux/sys-time-macros.h
index 06ae43f0e0054c..e97819594adcb1 100644
--- a/libc/include/llvm-libc-macros/linux/sys-time-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-time-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
 
 // Add two timevals and put the result in timeval_ptr_result. If the resulting
 // usec value is greater than 999,999 then the microseconds are turned into full
@@ -50,4 +50,4 @@
        ? ((timeval_ptr_a)->tv_usec CMP(timeval_ptr_b)->tv_usec)                \
        : ((timeval_ptr_a)->tv_sec CMP(timeval_ptr_b)->tv_sec))
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_TIME_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/sys-wait-macros.h b/libc/include/llvm-libc-macros/linux/sys-wait-macros.h
index 3e6c6f53cc7171..c101638fdae340 100644
--- a/libc/include/llvm-libc-macros/linux/sys-wait-macros.h
+++ b/libc/include/llvm-libc-macros/linux/sys-wait-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
 
 // Wait flags
 #define WNOHANG 1    // Do not block
@@ -41,4 +41,4 @@
 #define P_PGID 2
 #define P_PIDFD 3
 
-#endif // __LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_SYS_WAIT_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/termios-macros.h b/libc/include/llvm-libc-macros/linux/termios-macros.h
index 17e380ebecffe3..668cfe27abaabf 100644
--- a/libc/include/llvm-libc-macros/linux/termios-macros.h
+++ b/libc/include/llvm-libc-macros/linux/termios-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
 
 // Below are generic definitions of symbolic bit-masks, modes etc. They serve
 // most architectures including x86_64, aarch64 but have to be adjusted for few
@@ -164,4 +164,4 @@
 #define TCIOFF 2 // Suspend output
 #define TCION 3  // Restart output
 
-#endif // __LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_TERMIOS_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/time-macros.h b/libc/include/llvm-libc-macros/linux/time-macros.h
index ace27cb2e9eb4b..407a1eb30eeaf7 100644
--- a/libc/include/llvm-libc-macros/linux/time-macros.h
+++ b/libc/include/llvm-libc-macros/linux/time-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
 
 // clock type macros
 #define CLOCK_REALTIME 0
@@ -23,4 +23,4 @@
 
 #define CLOCKS_PER_SEC 1000000
 
-#endif //__LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_TIME_MACROS_H
diff --git a/libc/include/llvm-libc-macros/linux/unistd-macros.h b/libc/include/llvm-libc-macros/linux/unistd-macros.h
index cfdfb9a93ee9b0..c5109df435e68d 100644
--- a/libc/include/llvm-libc-macros/linux/unistd-macros.h
+++ b/libc/include/llvm-libc-macros/linux/unistd-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
-#define __LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
+#ifndef LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
+#define LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
 
 // Values for mode argument to the access(...) function.
 #define F_OK 0
@@ -27,4 +27,4 @@
                       (long)(arg4), (long)(arg5), (long)(arg6))
 #define syscall(...) __syscall_helper(__VA_ARGS__, 0, 1, 2, 3, 4, 5, 6)
 
-#endif // __LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
+#endif // LLVM_LIBC_MACROS_LINUX_UNISTD_MACROS_H
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 9f8edd954b7e0f..e67fe4d11b4493 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_MATH_MACROS_H
-#define __LLVM_LIBC_MACROS_MATH_MACROS_H
+#ifndef LLVM_LIBC_MACROS_MATH_MACROS_H
+#define LLVM_LIBC_MACROS_MATH_MACROS_H
 
 #include "limits-macros.h"
 
@@ -38,4 +38,4 @@
 #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
 #endif
 
-#endif // __LLVM_LIBC_MACROS_MATH_MACROS_H
+#endif // LLVM_LIBC_MACROS_MATH_MACROS_H
diff --git a/libc/include/llvm-libc-macros/null-macro.h b/libc/include/llvm-libc-macros/null-macro.h
index b83fc05c614dfb..416d4e865fc583 100644
--- a/libc/include/llvm-libc-macros/null-macro.h
+++ b/libc/include/llvm-libc-macros/null-macro.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LLVM_LIBC_MACROS_NULL_MACRO_H
-#define __LLVM_LIBC_MACROS_NULL_MACRO_H
+#ifndef LLVM_LIBC_MACROS_NULL_MACRO_H
+#define LLVM_LIBC_MACROS_...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/83319


More information about the libc-commits mailing list