-
Notifications
You must be signed in to change notification settings - Fork 15k
[libc] Fix all imports of src/string/memory_utils #114939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-libc Author: Krishna Pandey (krishna2803) ChangesFixed imports for all files within Full diff: https://github.com/llvm/llvm-project/pull/114939.diff 10 Files Affected:
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)
|
You can test this locally with the following command:git-clang-format --diff 9725595f3acc0c1aaa354e15ac4ee2b1f8ff4cc9 77b35b87c6f7bb0047413b3daab17bec44879cf3 --extensions h -- libc/src/dirent/readdir.h libc/src/string/allocating_string_utils.h libc/src/string/memory_utils/aarch64/inline_bcmp.h libc/src/string/memory_utils/aarch64/inline_memset.h libc/src/string/memory_utils/generic/builtin.h libc/src/string/memory_utils/inline_bcmp.h libc/src/string/memory_utils/inline_bzero.h libc/src/string/memory_utils/inline_memmem.h libc/src/string/memory_utils/inline_memmove.h libc/src/string/memory_utils/inline_strcmp.h libc/src/string/memory_utils/inline_strstr.h libc/src/string/memory_utils/op_aarch64.h libc/src/string/memory_utils/op_builtin.h libc/src/string/memory_utils/op_generic.h libc/src/string/memory_utils/op_riscv.h libc/src/string/memory_utils/op_x86.h libc/src/string/memory_utils/riscv/inline_bcmp.h libc/src/string/memory_utils/riscv/inline_memcmp.h libc/src/string/memory_utils/riscv/inline_memcpy.h libc/src/string/memory_utils/riscv/inline_memmove.h libc/src/string/memory_utils/riscv/inline_memset.h libc/src/string/memory_utils/utils.h libc/src/string/memory_utils/x86_64/inline_bcmp.h libc/src/string/memory_utils/x86_64/inline_memset.h View the diff from clang-format here.diff --git a/libc/src/string/memory_utils/aarch64/inline_bcmp.h b/libc/src/string/memory_utils/aarch64/inline_bcmp.h
index 63bef748cc..e41ac202db 100644
--- a/libc/src/string/memory_utils/aarch64/inline_bcmp.h
+++ b/libc/src/string/memory_utils/aarch64/inline_bcmp.h
@@ -8,8 +8,8 @@
#ifndef LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_BCMP_H
#define LIBC_SRC_STRING_MEMORY_UTILS_AARCH64_INLINE_BCMP_H
-#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
+#include "src/__support/macros/attributes.h" // LIBC_INLINE
+#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/string/memory_utils/op_aarch64.h"
#include "src/string/memory_utils/op_generic.h"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, libc/src/__support/CMakeLists.txt the definition of the common
header library (L54) is missing the dependency on config.h and attributes.h. It also falsely depends on endian.h, common.h, and cpu_features.h. That should get cleaned up in your PR.
Once that's cleaned up, then we can revisit changing the header source files.
463fcda
to
36badc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left more feedback
Hi @krishna2803 , thanks for updating this PR. It looks like you'll need to rebase on |
yeah sure! I'm on it |
547ed3f
to
327c70d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch! Need us to merge this for you?
yeah! thanks :D |
@krishna2803 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22018 Here is the relevant piece of the build log for the reference
|
Fixed imports for all files *within* `libc/src/string/memory_utils`. Note: This doesn't include **all** files that need to be fixed. Fixes llvm#86579
Fixed imports for all files within
libc/src/string/memory_utils
.Note: This doesn't include all files that need to be fixed.
Fixes #86579