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:
@@ -61,6 +61,8 @@ protected:
|
|||||||
{ return &__other == this; }
|
{ return &__other == this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
union ResourceInitHelper {
|
union ResourceInitHelper {
|
||||||
struct {
|
struct {
|
||||||
__new_delete_memory_resource_imp new_delete_res;
|
__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.
|
// Only in C++11 is "init_priority" needed to ensure initialization order.
|
||||||
ResourceInitHelper res_init __attribute__((init_priority (101)));
|
ResourceInitHelper res_init __attribute__((init_priority (101)));
|
||||||
|
|
||||||
|
} // end namespace
|
||||||
|
|
||||||
|
|
||||||
memory_resource * new_delete_resource() _NOEXCEPT {
|
memory_resource * new_delete_resource() _NOEXCEPT {
|
||||||
return &res_init.resources.new_delete_res;
|
return &res_init.resources.new_delete_res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user