Skip to content

Commit 2cc9795

Browse files
authored
[libc] Clean up some include in libc. (#110980)
The patch primarily cleans up some incorrect includes. The `LIBC_INLINE` macro is defined in `attributes.h`, not `config.h`. There appears to be no need to change the CMake and Bazel build files.
1 parent 8ebd401 commit 2cc9795

11 files changed

+10
-11
lines changed

libc/src/string/memory_utils/aarch64/inline_memcmp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCMP_H
99
#define LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCMP_H
1010

11-
#include "src/__support/macros/config.h" // LIBC_INLINE
11+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1212
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
1313
#include "src/string/memory_utils/op_aarch64.h"
1414
#include "src/string/memory_utils/op_generic.h"

libc/src/string/memory_utils/aarch64/inline_memcpy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_MEMCPY_H
99
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_MEMCPY_H
1010

11-
#include "src/__support/macros/config.h" // LIBC_INLINE
11+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1212
#include "src/string/memory_utils/op_builtin.h"
1313
#include "src/string/memory_utils/utils.h"
1414

libc/src/string/memory_utils/aarch64/inline_memmove.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_MEMMOVE_H
99
#define LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_MEMMOVE_H
1010

11-
#include "src/__support/macros/config.h" // LIBC_INLINE
11+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1212
#include "src/string/memory_utils/op_aarch64.h" // aarch64::kNeon
1313
#include "src/string/memory_utils/op_builtin.h"
1414
#include "src/string/memory_utils/op_generic.h"

libc/src/string/memory_utils/generic/aligned_access.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_GENERIC_ALIGNED_ACCESS_H
1414
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_GENERIC_ALIGNED_ACCESS_H
1515

16-
#include "src/__support/macros/config.h" // LIBC_INLINE
16+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1717
#include "src/string/memory_utils/generic/byte_per_byte.h"
1818
#include "src/string/memory_utils/op_generic.h" // generic::splat
1919
#include "src/string/memory_utils/utils.h" // Ptr, CPtr

libc/src/string/memory_utils/generic/byte_per_byte.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_GENERIC_BYTE_PER_BYTE_H
1313
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_GENERIC_BYTE_PER_BYTE_H
1414

15-
#include "src/__support/macros/config.h" // LIBC_INLINE
15+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1616
#include "src/__support/macros/optimization.h" // LIBC_LOOP_NOUNROLL
1717
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
1818

libc/src/string/memory_utils/inline_memcmp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMCMP_H
1010
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMCMP_H
1111

12-
#include "src/__support/macros/config.h" // LIBC_INLINE
12+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1313
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_
1414
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
1515

libc/src/string/memory_utils/inline_memcpy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMCPY_H
1010
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMCPY_H
1111

12-
#include "src/__support/macros/config.h" // LIBC_INLINE
12+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1313
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_
1414
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
1515

libc/src/string/memory_utils/inline_memset.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMSET_H
1010
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMSET_H
1111

12-
#include "src/__support/macros/config.h" // LIBC_INLINE
12+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1313
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_
1414
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
1515

libc/src/string/memory_utils/x86_64/inline_memcmp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCMP_H
1010
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCMP_H
1111

12-
#include "src/__support/macros/config.h" // LIBC_INLINE
12+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1313
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
1414
#include "src/string/memory_utils/op_generic.h"
1515
#include "src/string/memory_utils/op_x86.h"

libc/src/string/memory_utils/x86_64/inline_memcpy.h

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCPY_H
1010

1111
#include "src/__support/macros/attributes.h" // LIBC_INLINE_VAR
12-
#include "src/__support/macros/config.h" // LIBC_INLINE
1312
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
1413
#include "src/string/memory_utils/op_builtin.h"
1514
#include "src/string/memory_utils/op_x86.h"

libc/src/string/memory_utils/x86_64/inline_memmove.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMMOVE_H
99
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMMOVE_H
1010

11-
#include "src/__support/macros/config.h" // LIBC_INLINE
11+
#include "src/__support/macros/attributes.h" // LIBC_INLINE
1212
#include "src/string/memory_utils/op_builtin.h"
1313
#include "src/string/memory_utils/op_generic.h"
1414
#include "src/string/memory_utils/op_x86.h"

0 commit comments

Comments
 (0)