[libc-commits] [libc] c53e15e - [libc][NFC] Move compiler_features.h to properties subfolder

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Feb 9 01:26:47 PST 2023


Author: Guillaume Chatelet
Date: 2023-02-09T09:26:38Z
New Revision: c53e15e841b8c41c6874f4676cf8fb0411d84bff

URL: https://github.com/llvm/llvm-project/commit/c53e15e841b8c41c6874f4676cf8fb0411d84bff
DIFF: https://github.com/llvm/llvm-project/commit/c53e15e841b8c41c6874f4676cf8fb0411d84bff.diff

LOG: [libc][NFC] Move compiler_features.h to properties subfolder

Added: 
    libc/src/__support/macros/properties/compiler.h

Modified: 
    libc/src/__support/CMakeLists.txt
    libc/src/__support/CPP/bit.h
    libc/src/__support/builtin_wrappers.h
    libc/src/__support/macros/sanitizer.h
    libc/src/string/memory_utils/op_generic.h
    libc/src/string/memory_utils/utils.h
    libc/test/src/string/memory_utils/memory_check_utils.h
    utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Removed: 
    libc/src/__support/macros/compiler_features.h


################################################################################
diff  --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 65f79f497a0b9..f5d2a39b1b641 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -17,7 +17,7 @@ add_header_library(
 add_header_library(
   compiler_features
   HDRS
-    macros/compiler_features.h
+    macros/properties/compiler.h
 )
 
 add_header_library(

diff  --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h
index 7424f966acf8b..795b841839fff 100644
--- a/libc/src/__support/CPP/bit.h
+++ b/libc/src/__support/CPP/bit.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SUPPORT_CPP_BIT_H
 #define LLVM_LIBC_SUPPORT_CPP_BIT_H
 
-#include "src/__support/macros/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 
 namespace __llvm_libc::cpp {
 

diff  --git a/libc/src/__support/builtin_wrappers.h b/libc/src/__support/builtin_wrappers.h
index a3cd1f9403ac8..81f6622d197a0 100644
--- a/libc/src/__support/builtin_wrappers.h
+++ b/libc/src/__support/builtin_wrappers.h
@@ -13,7 +13,7 @@
 #include "named_pair.h"
 #include "src/__support/CPP/type_traits.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 
 namespace __llvm_libc {
 

diff  --git a/libc/src/__support/macros/compiler_features.h b/libc/src/__support/macros/properties/compiler.h
similarity index 89%
rename from libc/src/__support/macros/compiler_features.h
rename to libc/src/__support/macros/properties/compiler.h
index 720afe9abf26a..c95e62fa5275e 100644
--- a/libc/src/__support/macros/compiler_features.h
+++ b/libc/src/__support/macros/properties/compiler.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_SUPPORT_MACROS_COMPILER_FEATURES_H
-#define LLVM_LIBC_SUPPORT_MACROS_COMPILER_FEATURES_H
+#ifndef LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H
+#define LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H
 
 #if defined(__clang__)
 #define LIBC_COMPILER_IS_CLANG
@@ -46,4 +46,4 @@
 #define LIBC_LOOP_NOUNROLL
 #endif
 
-#endif // LLVM_LIBC_SUPPORT_MACROS_COMPILER_FEATURES_H
+#endif // LLVM_LIBC_SUPPORT_MACROS_PROPERTIES_COMPILER_H

diff  --git a/libc/src/__support/macros/sanitizer.h b/libc/src/__support/macros/sanitizer.h
index b3c8171a9c2ff..17cae9c86c35e 100644
--- a/libc/src/__support/macros/sanitizer.h
+++ b/libc/src/__support/macros/sanitizer.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_MACROS_SANITIZER_H
 #define LLVM_LIBC_SRC_SUPPORT_MACROS_SANITIZER_H
 
-#include "src/__support/macros/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 
 //-----------------------------------------------------------------------------
 // Properties to check the presence or absence or sanitizers

diff  --git a/libc/src/string/memory_utils/op_generic.h b/libc/src/string/memory_utils/op_generic.h
index cda68f2a5cd80..84beb679cf176 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/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 #include "src/string/memory_utils/op_builtin.h"
 #include "src/string/memory_utils/utils.h"
 

diff  --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h
index 57c1dac88efa7..5d42641296a19 100644
--- a/libc/src/string/memory_utils/utils.h
+++ b/libc/src/string/memory_utils/utils.h
@@ -13,7 +13,7 @@
 #include "src/__support/CPP/cstddef.h"
 #include "src/__support/CPP/type_traits.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 
 #include <stddef.h> // size_t
 #include <stdint.h> // intptr_t / uintptr_t

diff  --git a/libc/test/src/string/memory_utils/memory_check_utils.h b/libc/test/src/string/memory_utils/memory_check_utils.h
index ac737967b0988..19cbe0cf5ae60 100644
--- a/libc/test/src/string/memory_utils/memory_check_utils.h
+++ b/libc/test/src/string/memory_utils/memory_check_utils.h
@@ -10,7 +10,7 @@
 #define LIBC_TEST_SRC_STRING_MEMORY_UTILS_MEMORY_CHECK_UTILS_H
 
 #include "src/__support/CPP/span.h"
-#include "src/__support/macros/compiler_features.h"
+#include "src/__support/macros/properties/compiler.h"
 #include "src/__support/macros/sanitizer.h"
 #include "src/string/memory_utils/utils.h"
 #include <assert.h> // assert

diff  --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index a8fa0a00318bb..d114467645c12 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -62,7 +62,7 @@ cc_library(
 
 libc_support_library(
     name = "__support_compiler_features",
-    hdrs = ["src/__support/macros/compiler_features.h"],
+    hdrs = ["src/__support/macros/properties/compiler.h"],
     deps = [":libc_root"],
 )
 


        


More information about the libc-commits mailing list