[libcxx] r275089 - Hide some internal symbols for memory resource.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 11 12:22:10 PDT 2016


Author: ericwf
Date: Mon Jul 11 14:22:09 2016
New Revision: 275089

URL: http://llvm.org/viewvc/llvm-project?rev=275089&view=rev
Log:
Hide some internal symbols for memory resource.

Modified:
    libcxx/trunk/src/experimental/memory_resource.cpp

Modified: libcxx/trunk/src/experimental/memory_resource.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/experimental/memory_resource.cpp?rev=275089&r1=275088&r2=275089&view=diff
==============================================================================
--- libcxx/trunk/src/experimental/memory_resource.cpp (original)
+++ libcxx/trunk/src/experimental/memory_resource.cpp Mon Jul 11 14:22:09 2016
@@ -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;
 }




More information about the cfe-commits mailing list