[libcxx-commits] [libcxx] e98060f - [libc++] Move __memory/utilities.h to __memory/allocation_guard.h

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 14 11:04:14 PDT 2021


Author: Louis Dionne
Date: 2021-04-14T14:00:48-04:00
New Revision: e98060fa72ccb3c43d359dc5842f7d102dcf4378

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

LOG: [libc++] Move __memory/utilities.h to __memory/allocation_guard.h

This matches the granularity of other headers that were split off of <__memory>.

Added: 
    libcxx/include/__memory/allocation_guard.h

Modified: 
    libcxx/include/CMakeLists.txt
    libcxx/include/__memory/shared_ptr.h
    libcxx/include/memory

Removed: 
    libcxx/include/__memory/utilities.h


################################################################################
diff  --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 155d03d100b54..8050fd95a82a7 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -14,6 +14,7 @@ set(files
   __libcpp_version
   __locale
   __memory/addressof.h
+  __memory/allocation_guard.h
   __memory/allocator.h
   __memory/allocator_traits.h
   __memory/auto_ptr.h
@@ -26,7 +27,6 @@ set(files
   __memory/temporary_buffer.h
   __memory/uninitialized_algorithms.h
   __memory/unique_ptr.h
-  __memory/utilities.h
   __mutex_base
   __node_handle
   __nullptr

diff  --git a/libcxx/include/__memory/utilities.h b/libcxx/include/__memory/allocation_guard.h
similarity index 95%
rename from libcxx/include/__memory/utilities.h
rename to libcxx/include/__memory/allocation_guard.h
index aac3d11cab574..ea1d26456551c 100644
--- a/libcxx/include/__memory/utilities.h
+++ b/libcxx/include/__memory/allocation_guard.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_UTILITIES_H
-#define _LIBCPP___MEMORY_UTILITIES_H
+#ifndef _LIBCPP___MEMORY_ALLOCATION_GUARD_H
+#define _LIBCPP___MEMORY_ALLOCATION_GUARD_H
 
 #include <__config>
 #include <__memory/allocator_traits.h>
@@ -85,4 +85,4 @@ _LIBCPP_END_NAMESPACE_STD
 
 _LIBCPP_POP_MACROS
 
-#endif  // _LIBCPP___MEMORY_UTILITIES_H
+#endif  // _LIBCPP___MEMORY_ALLOCATION_GUARD_H

diff  --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 32d9af664a612..fae94bee2d52c 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -14,13 +14,13 @@
 #include <__availability>
 #include <__functional_base> // std::less, std::binary_function
 #include <__memory/addressof.h>
+#include <__memory/allocation_guard.h>
 #include <__memory/allocator.h>
 #include <__memory/allocator_traits.h>
 #include <__memory/auto_ptr.h>
 #include <__memory/compressed_pair.h>
 #include <__memory/pointer_traits.h>
 #include <__memory/unique_ptr.h>
-#include <__memory/utilities.h> // __allocation_guard
 #include <cstddef>
 #include <cstdlib> // abort
 #include <iosfwd>

diff  --git a/libcxx/include/memory b/libcxx/include/memory
index b3c1a8642a49e..ae3c2cef2f8e9 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -679,6 +679,7 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
 #include <stdexcept>
 #include <cstring>
 #include <__memory/addressof.h>
+#include <__memory/allocation_guard.h>
 #include <__memory/allocator.h>
 #include <__memory/allocator_traits.h>
 #include <__memory/auto_ptr.h>
@@ -691,7 +692,6 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
 #include <__memory/temporary_buffer.h>
 #include <__memory/uninitialized_algorithms.h>
 #include <__memory/unique_ptr.h>
-#include <__memory/utilities.h>
 #include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)


        


More information about the libcxx-commits mailing list