Avoid name conflict with kernel headers

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@359080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2019-04-24 09:43:44 +00:00
parent 82c110a209
commit 8e365750a0
4 changed files with 12 additions and 9 deletions

View File

@@ -2248,7 +2248,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
return _InsertReturnType{end(), false, _NodeHandle()}; return _InsertReturnType{end(), false, _NodeHandle()};
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_); pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
if (__result.second) if (__result.second)
__nh.__release(); __nh.__release_ptr();
return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)}; 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(); return end();
pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_); pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
if (__result.second) if (__result.second)
__nh.__release(); __nh.__release_ptr();
return __result.first; return __result.first;
} }
@@ -2327,7 +2327,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
if (__nh.empty()) if (__nh.empty())
return end(); return end();
iterator __result = __node_insert_multi(__nh.__ptr_); iterator __result = __node_insert_multi(__nh.__ptr_);
__nh.__release(); __nh.__release_ptr();
return __result; return __result;
} }
@@ -2341,7 +2341,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
if (__nh.empty()) if (__nh.empty())
return end(); return end();
iterator __result = __node_insert_multi(__hint, __nh.__ptr_); iterator __result = __node_insert_multi(__hint, __nh.__ptr_);
__nh.__release(); __nh.__release_ptr();
return __result; return __result;
} }

View File

@@ -56,7 +56,7 @@ private:
optional<allocator_type> __alloc_; optional<allocator_type> __alloc_;
_LIBCPP_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
void __release() void __release_ptr()
{ {
__ptr_ = nullptr; __ptr_ = nullptr;
__alloc_ = _VSTD::nullopt; __alloc_ = _VSTD::nullopt;

View File

@@ -2414,7 +2414,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
__insert_node_at(__parent, __child, __insert_node_at(__parent, __child,
static_cast<__node_base_pointer>(__ptr)); static_cast<__node_base_pointer>(__ptr));
__nh.__release(); __nh.__release_ptr();
return _InsertReturnType{iterator(__ptr), true, _NodeHandle()}; return _InsertReturnType{iterator(__ptr), true, _NodeHandle()};
} }
@@ -2439,7 +2439,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
__insert_node_at(__parent, __child, __insert_node_at(__parent, __child,
static_cast<__node_base_pointer>(__ptr)); static_cast<__node_base_pointer>(__ptr));
__r = __ptr; __r = __ptr;
__nh.__release(); __nh.__release_ptr();
} }
return iterator(__r); return iterator(__r);
} }
@@ -2504,7 +2504,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(_NodeHandle&& __nh
__node_base_pointer& __child = __find_leaf_high( __node_base_pointer& __child = __find_leaf_high(
__parent, _NodeTypes::__get_key(__ptr->__value_)); __parent, _NodeTypes::__get_key(__ptr->__value_));
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr)); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
__nh.__release(); __nh.__release_ptr();
return iterator(__ptr); return iterator(__ptr);
} }
@@ -2523,7 +2523,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(
__node_base_pointer& __child = __find_leaf(__hint, __parent, __node_base_pointer& __child = __find_leaf(__hint, __parent,
_NodeTypes::__get_key(__ptr->__value_)); _NodeTypes::__get_key(__ptr->__value_));
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr)); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr));
__nh.__release(); __nh.__release_ptr();
return iterator(__ptr); return iterator(__ptr);
} }

View File

@@ -62,4 +62,7 @@
#define __output NASTY_MACRO #define __output NASTY_MACRO
#define __input NASTY_MACRO #define __input NASTY_MACRO
#define __acquire NASTY_MACRO
#define __release NASTY_MACRO
#endif // SUPPORT_NASTY_MACROS_HPP #endif // SUPPORT_NASTY_MACROS_HPP