Hide some internal symbols for memory resource.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-07-11 19:22:09 +00:00
parent faa37d5de6
commit 4a98c1e776

View File

@@ -61,6 +61,8 @@ protected:
{ return &__other == this; }
};
namespace {
union ResourceInitHelper {
struct {
__new_delete_memory_resource_imp new_delete_res;
@@ -74,6 +76,9 @@ union ResourceInitHelper {
// Only in C++11 is "init_priority" needed to ensure initialization order.
ResourceInitHelper res_init __attribute__((init_priority (101)));
} // end namespace
memory_resource * new_delete_resource() _NOEXCEPT {
return &res_init.resources.new_delete_res;
}