Skip to content
Permalink
Browse files

Avoid name conflict with kernel headers

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359080 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
EricWF committed Apr 24, 2019
1 parent 82c110a commit 8e365750a0299ee0cbef70a3f3492c7716f81d5b
Showing with 12 additions and 9 deletions.
  1. +4 −4 include/__hash_table
  2. +1 −1 include/__node_handle
  3. +4 −4 include/__tree
  4. +3 −0 test/support/nasty_macros.hpp
@@ -2248,7 +2248,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
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>::__node_handle_insert_unique(
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>::__node_handle_insert_multi(
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>::__node_handle_insert_multi(
if (__nh.empty())
return end();
iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
__nh.__release();
__nh.__release_ptr();
return __result;
}

@@ -56,7 +56,7 @@ private:
optional<allocator_type> __alloc_;

_LIBCPP_INLINE_VISIBILITY
void __release()
void __release_ptr()
{
__ptr_ = nullptr;
__alloc_ = _VSTD::nullopt;
@@ -2414,7 +2414,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(

__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>::__node_handle_insert_unique(
__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>::__node_handle_insert_multi(_NodeHandle&& __nh
__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>::__node_handle_insert_multi(
__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);
}

@@ -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

0 comments on commit 8e36575

Please sign in to comment.
You can’t perform that action at this time.