[libc-commits] [libc] [libc] Fix all imports of src/string/memory_utils (PR #114939)
Krishna Pandey via libc-commits
libc-commits at lists.llvm.org
Fri Nov 8 14:46:15 PST 2024
https://github.com/krishna2803 updated https://github.com/llvm/llvm-project/pull/114939
>From 0be8e52af2621d974a700b2c74bd808db9f4c9d1 Mon Sep 17 00:00:00 2001
From: krishna2803 <kpandey81930 at gmail.com>
Date: Tue, 5 Nov 2024 10:49:22 +0530
Subject: [PATCH 1/3] Fix all imports of src/string/memory_utils
---
libc/src/string/memory_utils/inline_bcmp.h | 2 +-
libc/src/string/memory_utils/inline_bzero.h | 2 +-
libc/src/string/memory_utils/inline_memmove.h | 2 +-
libc/src/string/memory_utils/inline_strcmp.h | 2 +-
libc/src/string/memory_utils/inline_strstr.h | 2 +-
libc/src/string/memory_utils/op_aarch64.h | 2 +-
libc/src/string/memory_utils/op_builtin.h | 2 +-
libc/src/string/memory_utils/op_generic.h | 2 +-
libc/src/string/memory_utils/op_riscv.h | 2 +-
libc/src/string/memory_utils/op_x86.h | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libc/src/string/memory_utils/inline_bcmp.h b/libc/src/string/memory_utils/inline_bcmp.h
index 14cf16ebb6b69f..84470dac76fd6d 100644
--- a/libc/src/string/memory_utils/inline_bcmp.h
+++ b/libc/src/string/memory_utils/inline_bcmp.h
@@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_BCMP_H
#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_
#include <stddef.h> // size_t
diff --git a/libc/src/string/memory_utils/inline_bzero.h b/libc/src/string/memory_utils/inline_bzero.h
index 4a92e8b57a68e2..03bd29ab623c60 100644
--- a/libc/src/string/memory_utils/inline_bzero.h
+++ b/libc/src/string/memory_utils/inline_bzero.h
@@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_BZERO_H
#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/string/memory_utils/inline_memset.h"
#include <stddef.h> // size_t
diff --git a/libc/src/string/memory_utils/inline_memmove.h b/libc/src/string/memory_utils/inline_memmove.h
index 85d0159701ece6..721f6f80e0f286 100644
--- a/libc/src/string/memory_utils/inline_memmove.h
+++ b/libc/src/string/memory_utils/inline_memmove.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMMOVE_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMMOVE_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include <stddef.h> // size_t, ptrdiff_t
#if defined(LIBC_TARGET_ARCH_IS_X86)
diff --git a/libc/src/string/memory_utils/inline_strcmp.h b/libc/src/string/memory_utils/inline_strcmp.h
index 281d5b14c6cbac..0c3e9cf14c8234 100644
--- a/libc/src/string/memory_utils/inline_strcmp.h
+++ b/libc/src/string/memory_utils/inline_strcmp.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_STRCMP_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_STRCMP_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include <stddef.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/string/memory_utils/inline_strstr.h b/libc/src/string/memory_utils/inline_strstr.h
index 9c99e920b4b570..1ff9a56e288780 100644
--- a/libc/src/string/memory_utils/inline_strstr.h
+++ b/libc/src/string/memory_utils/inline_strstr.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_STRSTR_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_STRSTR_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/string/memory_utils/inline_memmem.h"
#include "src/string/string_utils.h"
#include <stddef.h>
diff --git a/libc/src/string/memory_utils/op_aarch64.h b/libc/src/string/memory_utils/op_aarch64.h
index 1090ea2617f096..3be7f6006cb8c7 100644
--- a/libc/src/string/memory_utils/op_aarch64.h
+++ b/libc/src/string/memory_utils/op_aarch64.h
@@ -13,7 +13,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_AARCH64_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_AARCH64_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/properties/architectures.h"
#if defined(LIBC_TARGET_ARCH_IS_AARCH64)
diff --git a/libc/src/string/memory_utils/op_builtin.h b/libc/src/string/memory_utils/op_builtin.h
index d7c1b1f870115a..a4d5f6d3f38f97 100644
--- a/libc/src/string/memory_utils/op_builtin.h
+++ b/libc/src/string/memory_utils/op_builtin.h
@@ -16,7 +16,7 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_BUILTIN_H
#include "src/__support/CPP/type_traits.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/string/memory_utils/utils.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/string/memory_utils/op_generic.h b/libc/src/string/memory_utils/op_generic.h
index 89bbea8a2bdd2b..aa97850da11690 100644
--- a/libc/src/string/memory_utils/op_generic.h
+++ b/libc/src/string/memory_utils/op_generic.h
@@ -27,7 +27,7 @@
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
#include "src/__support/endian.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/optimization.h"
#include "src/__support/macros/properties/types.h" // LIBC_TYPES_HAS_INT64
#include "src/string/memory_utils/op_builtin.h"
diff --git a/libc/src/string/memory_utils/op_riscv.h b/libc/src/string/memory_utils/op_riscv.h
index 2d211de0facfc9..b6349505f976e0 100644
--- a/libc/src/string/memory_utils/op_riscv.h
+++ b/libc/src/string/memory_utils/op_riscv.h
@@ -12,7 +12,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_RISCV_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_RISCV_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/properties/architectures.h"
#if defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
diff --git a/libc/src/string/memory_utils/op_x86.h b/libc/src/string/memory_utils/op_x86.h
index ab694e25fe0fe1..2a651b72e89cf4 100644
--- a/libc/src/string/memory_utils/op_x86.h
+++ b/libc/src/string/memory_utils/op_x86.h
@@ -12,7 +12,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_X86_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_X86_H
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/properties/architectures.h"
#if defined(LIBC_TARGET_ARCH_IS_X86)
>From 334702ebd77c0738ed49dd7cfd574ddb1333c178 Mon Sep 17 00:00:00 2001
From: krishna2803 <kpandey81930 at gmail.com>
Date: Sat, 9 Nov 2024 03:36:01 +0530
Subject: [PATCH 2/3] Fix imports in libc/src/__support/CMakeLists.txt
---
libc/src/__support/CMakeLists.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index c44e333645e22e..f39f8fb235abe7 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -54,11 +54,9 @@ add_header_library(
add_header_library(
common
HDRS
- common.h
- endian.h
macros/properties/architectures.h
macros/attributes.h
- macros/properties/cpu_features.h
+ macros/config.h
)
add_header_library(
>From 8db73ebf00bbb51197bb7498a54f6098fa641e7f Mon Sep 17 00:00:00 2001
From: krishna2803 <kpandey81930 at gmail.com>
Date: Sat, 9 Nov 2024 04:15:12 +0530
Subject: [PATCH 3/3] Fix more imports
---
libc/src/string/allocating_string_utils.h | 2 +-
libc/src/string/memory_utils/aarch64/inline_bcmp.h | 1 -
libc/src/string/memory_utils/aarch64/inline_memset.h | 1 -
libc/src/string/memory_utils/generic/builtin.h | 1 -
libc/src/string/memory_utils/inline_memmem.h | 1 -
libc/src/string/memory_utils/riscv/inline_bcmp.h | 1 -
libc/src/string/memory_utils/riscv/inline_memcmp.h | 1 -
libc/src/string/memory_utils/riscv/inline_memcpy.h | 1 -
libc/src/string/memory_utils/riscv/inline_memmove.h | 1 -
libc/src/string/memory_utils/riscv/inline_memset.h | 1 -
libc/src/string/memory_utils/utils.h | 1 -
libc/src/string/memory_utils/x86_64/inline_bcmp.h | 1 -
libc/src/string/memory_utils/x86_64/inline_memset.h | 1 -
13 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/libc/src/string/allocating_string_utils.h b/libc/src/string/allocating_string_utils.h
index b3a8663c2f477c..af279db7120d6d 100644
--- a/libc/src/string/allocating_string_utils.h
+++ b/libc/src/string/allocating_string_utils.h
@@ -11,7 +11,7 @@
#include "src/__support/CPP/new.h"
#include "src/__support/CPP/optional.h"
-#include "src/__support/macros/config.h"
+#include "src/__support/macros/attributes.h"
#include "src/string/memory_utils/inline_memcpy.h"
#include "src/string/string_utils.h"
diff --git a/libc/src/string/memory_utils/aarch64/inline_bcmp.h b/libc/src/string/memory_utils/aarch64/inline_bcmp.h
index 93196415f26625..12ea15dfdc6383 100644
--- a/libc/src/string/memory_utils/aarch64/inline_bcmp.h
+++ b/libc/src/string/memory_utils/aarch64/inline_bcmp.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_BCMP_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/string/memory_utils/op_aarch64.h"
#include "src/string/memory_utils/op_generic.h"
diff --git a/libc/src/string/memory_utils/aarch64/inline_memset.h b/libc/src/string/memory_utils/aarch64/inline_memset.h
index a2c05534aa330e..6ec17e9cf6cecc 100644
--- a/libc/src/string/memory_utils/aarch64/inline_memset.h
+++ b/libc/src/string/memory_utils/aarch64/inline_memset.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_MEMSET_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/string/memory_utils/op_aarch64.h"
#include "src/string/memory_utils/op_generic.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/generic/builtin.h b/libc/src/string/memory_utils/generic/builtin.h
index 5670a4e610565b..274e8e52a1dbb4 100644
--- a/libc/src/string/memory_utils/generic/builtin.h
+++ b/libc/src/string/memory_utils/generic/builtin.h
@@ -10,7 +10,6 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_GENERIC_BUILTIN_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
#include <stddef.h> // size_t
diff --git a/libc/src/string/memory_utils/inline_memmem.h b/libc/src/string/memory_utils/inline_memmem.h
index 15e3d633985d61..6f62d4a10e2c79 100644
--- a/libc/src/string/memory_utils/inline_memmem.h
+++ b/libc/src/string/memory_utils/inline_memmem.h
@@ -10,7 +10,6 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_INLINE_MEMMEM_H
#include "src/__support/macros/attributes.h"
-#include "src/__support/macros/config.h"
#include <stddef.h>
diff --git a/libc/src/string/memory_utils/riscv/inline_bcmp.h b/libc/src/string/memory_utils/riscv/inline_bcmp.h
index 4bdde27cd16be2..1838e8c4229d9a 100644
--- a/libc/src/string/memory_utils/riscv/inline_bcmp.h
+++ b/libc/src/string/memory_utils/riscv/inline_bcmp.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_RISCV_INLINE_BCMP_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_RISCV64
#include "src/string/memory_utils/generic/aligned_access.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/riscv/inline_memcmp.h b/libc/src/string/memory_utils/riscv/inline_memcmp.h
index ca834952d331ea..9bafb45f6d3397 100644
--- a/libc/src/string/memory_utils/riscv/inline_memcmp.h
+++ b/libc/src/string/memory_utils/riscv/inline_memcmp.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_RISCV_INLINE_MEMCMP_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_RISCV64
#include "src/string/memory_utils/generic/aligned_access.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/riscv/inline_memcpy.h b/libc/src/string/memory_utils/riscv/inline_memcpy.h
index 8eb87e0f38ce5a..4da835acfbfa02 100644
--- a/libc/src/string/memory_utils/riscv/inline_memcpy.h
+++ b/libc/src/string/memory_utils/riscv/inline_memcpy.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_RISCV_INLINE_MEMCPY_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_RISCV64
#include "src/string/memory_utils/generic/aligned_access.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/riscv/inline_memmove.h b/libc/src/string/memory_utils/riscv/inline_memmove.h
index 28de4c240260d4..d6e2e4ebd5fd80 100644
--- a/libc/src/string/memory_utils/riscv/inline_memmove.h
+++ b/libc/src/string/memory_utils/riscv/inline_memmove.h
@@ -9,7 +9,6 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_RISCV_INLINE_MEMMOVE_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_RISCV64
#include "src/string/memory_utils/generic/byte_per_byte.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/riscv/inline_memset.h b/libc/src/string/memory_utils/riscv/inline_memset.h
index d6ab523f164144..279c3bfef7a1a7 100644
--- a/libc/src/string/memory_utils/riscv/inline_memset.h
+++ b/libc/src/string/memory_utils/riscv/inline_memset.h
@@ -9,7 +9,6 @@
#define LIBC_SRC_STRING_MEMORY_UTILS_RISCV_INLINE_MEMSET_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h" // LIBC_TARGET_ARCH_IS_RISCV64
#include "src/string/memory_utils/generic/aligned_access.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h
index 5e5fe593cce773..5433912daf6bfa 100644
--- a/libc/src/string/memory_utils/utils.h
+++ b/libc/src/string/memory_utils/utils.h
@@ -14,7 +14,6 @@
#include "src/__support/CPP/type_traits.h"
#include "src/__support/endian.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/architectures.h"
#include <stddef.h> // size_t
diff --git a/libc/src/string/memory_utils/x86_64/inline_bcmp.h b/libc/src/string/memory_utils/x86_64/inline_bcmp.h
index cc54c4140ee6e6..ad75d57dfc43ef 100644
--- a/libc/src/string/memory_utils/x86_64/inline_bcmp.h
+++ b/libc/src/string/memory_utils/x86_64/inline_bcmp.h
@@ -9,7 +9,6 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_BCMP_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/string/memory_utils/op_generic.h"
#include "src/string/memory_utils/op_x86.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
diff --git a/libc/src/string/memory_utils/x86_64/inline_memset.h b/libc/src/string/memory_utils/x86_64/inline_memset.h
index 9f8e584d2bbb45..fd8d7f35d97f46 100644
--- a/libc/src/string/memory_utils/x86_64/inline_memset.h
+++ b/libc/src/string/memory_utils/x86_64/inline_memset.h
@@ -9,7 +9,6 @@
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMSET_H
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h"
#include "src/string/memory_utils/op_generic.h"
#include "src/string/memory_utils/op_x86.h"
#include "src/string/memory_utils/utils.h" // Ptr, CPtr
More information about the libc-commits
mailing list