Currently functions and types that are pure implementation must be individually annotated with a DSO visibility attribute. This requires tedious repetition and is prone to errors.
As it stands there are a number of symbols within libc++ that do not have a visibility attribute. These symbols may or may be compiled into the DSO depending on the compilation flags. This leads to the DSO providing an unstable and unmanageable set of symbols.
This patch creates a nested namespace __libcpp_internal that sets the visibility to "hidden" for all symbols within it. Classes and functions that are pure implementation details should live within this namespace. This way the symbols don't have to be individually annotated.
Slowly but surely symbols should be moved to this namespace. Migrating code into this namespace will be tricky. We will have to ensure that no platform already ships a DSO that contains the candidate symbols.
within