summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-04-24 09:43:44 +0000
committerEric Fiselier <eric@efcs.ca>2019-04-24 09:43:44 +0000
commit6886f1e39bbb1adb4b16be6e3293c4f339358dbf (patch)
tree76f59960b520966ffe136a267867625f91db7df7
parent3ba9a43057f5b0e31a3e922e8ceec6c45f434b8e (diff)
downloadbcm5719-llvm-6886f1e39bbb1adb4b16be6e3293c4f339358dbf.tar.gz
bcm5719-llvm-6886f1e39bbb1adb4b16be6e3293c4f339358dbf.zip
Avoid name conflict with kernel headers
llvm-svn: 359080
-rw-r--r--libcxx/include/__hash_table8
-rw-r--r--libcxx/include/__node_handle2
-rw-r--r--libcxx/include/__tree8
-rw-r--r--libcxx/test/support/nasty_macros.hpp3
4 files changed, 12 insertions, 9 deletions
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 4b04dd62dbb..e02d3472902 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -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;
}
diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index e543fa9b20f..be1fe17a872 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -56,7 +56,7 @@ private:
optional<allocator_type> __alloc_;
_LIBCPP_INLINE_VISIBILITY
- void __release()
+ void __release_ptr()
{
__ptr_ = nullptr;
__alloc_ = _VSTD::nullopt;
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 0aa9bff6151..4473ac36977 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -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);
}
diff --git a/libcxx/test/support/nasty_macros.hpp b/libcxx/test/support/nasty_macros.hpp
index 30d0ec003bb..0106f70e904 100644
--- a/libcxx/test/support/nasty_macros.hpp
+++ b/libcxx/test/support/nasty_macros.hpp
@@ -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
OpenPOWER on IntegriCloud