[libcxx-commits] [libcxx] r359080 - Avoid name conflict with kernel headers

Eric Fiselier via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 24 02:43:44 PDT 2019


Author: ericwf
Date: Wed Apr 24 02:43:44 2019
New Revision: 359080

URL: http://llvm.org/viewvc/llvm-project?rev=359080&view=rev
Log:
Avoid name conflict with kernel headers

Modified:
    libcxx/trunk/include/__hash_table
    libcxx/trunk/include/__node_handle
    libcxx/trunk/include/__tree
    libcxx/trunk/test/support/nasty_macros.hpp

Modified: libcxx/trunk/include/__hash_table
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__hash_table?rev=359080&r1=359079&r2=359080&view=diff
==============================================================================
--- libcxx/trunk/include/__hash_table (original)
+++ libcxx/trunk/include/__hash_table Wed Apr 24 02:43:44 2019
@@ -2248,7 +2248,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
         return _InsertReturnType{end(), false, _NodeHandle()};
     pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
     if (__result.second)
-        __nh.__release();
+        __nh.__release_ptr();
     return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
 }
 
@@ -2263,7 +2263,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
         return end();
     pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
     if (__result.second)
-        __nh.__release();
+        __nh.__release_ptr();
     return __result.first;
 }
 
@@ -2327,7 +2327,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     if (__nh.empty())
         return end();
     iterator __result = __node_insert_multi(__nh.__ptr_);
-    __nh.__release();
+    __nh.__release_ptr();
     return __result;
 }
 
@@ -2341,7 +2341,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     if (__nh.empty())
         return end();
     iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
-    __nh.__release();
+    __nh.__release_ptr();
     return __result;
 }
 

Modified: libcxx/trunk/include/__node_handle
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__node_handle?rev=359080&r1=359079&r2=359080&view=diff
==============================================================================
--- libcxx/trunk/include/__node_handle (original)
+++ libcxx/trunk/include/__node_handle Wed Apr 24 02:43:44 2019
@@ -56,7 +56,7 @@ private:
     optional<allocator_type> __alloc_;
 
     _LIBCPP_INLINE_VISIBILITY
-    void __release()
+    void __release_ptr()
     {
         __ptr_ = nullptr;
         __alloc_ = _VSTD::nullopt;

Modified: libcxx/trunk/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__tree?rev=359080&r1=359079&r2=359080&view=diff
==============================================================================
--- libcxx/trunk/include/__tree (original)
+++ libcxx/trunk/include/__tree Wed Apr 24 02:43:44 2019
@@ -2414,7 +2414,7 @@ __tree<_Tp, _Compare, _Allocator>::__nod
 
     __insert_node_at(__parent, __child,
                      static_cast<__node_base_pointer>(__ptr));
-    __nh.__release();
+    __nh.__release_ptr();
     return _InsertReturnType{iterator(__ptr), true, _NodeHandle()};
 }
 
@@ -2439,7 +2439,7 @@ __tree<_Tp, _Compare, _Allocator>::__nod
         __insert_node_at(__parent, __child,
                          static_cast<__node_base_pointer>(__ptr));
         __r = __ptr;
-        __nh.__release();
+        __nh.__release_ptr();
     }
     return iterator(__r);
 }
@@ -2504,7 +2504,7 @@ __tree<_Tp, _Compare, _Allocator>::__nod
     __node_base_pointer& __child = __find_leaf_high(
         __parent, _NodeTypes::__get_key(__ptr->__value_));
     __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
-    __nh.__release();
+    __nh.__release_ptr();
     return iterator(__ptr);
 }
 
@@ -2523,7 +2523,7 @@ __tree<_Tp, _Compare, _Allocator>::__nod
     __node_base_pointer& __child = __find_leaf(__hint, __parent,
                                                _NodeTypes::__get_key(__ptr->__value_));
     __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
-    __nh.__release();
+    __nh.__release_ptr();
     return iterator(__ptr);
 }
 

Modified: libcxx/trunk/test/support/nasty_macros.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/nasty_macros.hpp?rev=359080&r1=359079&r2=359080&view=diff
==============================================================================
--- libcxx/trunk/test/support/nasty_macros.hpp (original)
+++ libcxx/trunk/test/support/nasty_macros.hpp Wed Apr 24 02:43:44 2019
@@ -62,4 +62,7 @@
 #define __output NASTY_MACRO
 #define __input NASTY_MACRO
 
+#define __acquire NASTY_MACRO
+#define __release NASTY_MACRO
+
 #endif // SUPPORT_NASTY_MACROS_HPP




More information about the libcxx-commits mailing list