ldionne created this revision.
ldionne added reviewers: EricWF, mclow.lists.
Herald added subscribers: cfe-commits, dexonsmith, christof.
ldionne added a comment.

This is the second step of the proposal aiming to remove uses of 
`__always_inline__` in the visibility macros. This proposal is documented on 
the list here: http://lists.llvm.org/pipermail/cfe-dev/2018-July/058633.html


This macro allows hiding symbols from the ABI when the library is built
with an ABI version after ABI v1, which is currently the only stable ABI.
This commit defines `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` to be
`_LIBCPP_HIDE_FROM_ABI_AFTER_V1`, meaning that symbols that were only
exported by the library for historical reasons are not exported anymore
in the unstable ABI.

Because of that, this commit is an ABI break for ABI v2. This ABI version
is not stable, however, so this should not be a problem.


Repository:
  rCXX libc++

https://reviews.llvm.org/D49914

Files:
  libcxx/docs/DesignDocs/VisibilityMacros.rst
  libcxx/include/__config
  libcxx/lib/abi/x86_64-apple-darwin.v2.abilist

Index: libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
===================================================================
--- libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
+++ libcxx/lib/abi/x86_64-apple-darwin.v2.abilist
@@ -180,8 +180,6 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE5do_inER11__mbstate_tPKcS5_RS5_PwS7_RS7_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE6do_outER11__mbstate_tPKwS5_RS5_PcS7_RS7_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215__codecvt_utf16IwLb1EE9do_lengthER11__mbstate_tPKcS5_m'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215basic_streambufIcNS_11char_traitsIcEEE6getlocEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215basic_streambufIwNS_11char_traitsIwEEE6getlocEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__215error_condition7messageEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217bad_function_call4whatEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNKSt3__217moneypunct_bynameIcLb0EE11do_groupingEv'}
@@ -812,35 +810,25 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__212system_errorD2Ev'}
 {'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__213allocator_argE', 'size': 0}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEPcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEPclc'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERNS_15basic_streambufIcS2_EEc'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getERc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE3getEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4peekEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4readEPcl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE4syncEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgENS_4fposI11__mbstate_tEE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5seekgExNS_8ios_base7seekdirE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5tellgEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE5ungetEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6ignoreEli'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC1ERS3_b'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE6sentryC2ERS3_b'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7getlineEPcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7getlineEPclc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE7putbackEc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEE8readsomeEPcl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEED2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_8ios_baseES5_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPFRNS_9basic_iosIcS2_EES6_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsEPNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERPv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERb'}
@@ -855,35 +843,25 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERt'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERx'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIcNS_11char_traitsIcEEErsERy'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEPwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEPwlw'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERNS_15basic_streambufIwS2_EEw'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getERw'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE3getEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4peekEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4readEPwl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE4syncEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5seekgExNS_8ios_base7seekdirE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5tellgEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE5ungetEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6ignoreEli'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC1ERS3_b'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE6sentryC2ERS3_b'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7getlineEPwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7getlineEPwlw'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE7putbackEw'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEE8readsomeEPwl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEED2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_8ios_baseES5_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPFRNS_9basic_iosIwS2_EES6_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPFRS3_S4_E'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsEPNS_15basic_streambufIwS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERPv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERb'}
@@ -899,24 +877,15 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERx'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_istreamIwNS_11char_traitsIwEEErsERy'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE3putEc'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5flushEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5seekpENS_4fposI11__mbstate_tEE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5seekpExNS_8ios_base7seekdirE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5tellpEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE5writeEPKcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryC2ERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEE6sentryD2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEED2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_8ios_baseES5_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPFRNS_9basic_iosIcS2_EES6_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPFRS3_S4_E'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPKv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEPNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEb'}
@@ -932,24 +901,15 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEx'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIcNS_11char_traitsIcEEElsEy'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE3putEw'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5flushEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5seekpENS_4fposI11__mbstate_tEE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5seekpExNS_8ios_base7seekdirE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5tellpEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE5writeEPKwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC1ERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryC2ERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEE6sentryD2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEEC1EPNS_15basic_streambufIwS2_EE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEEC2EPNS_15basic_streambufIwS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEED2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_8ios_baseES5_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPFRNS_9basic_iosIwS2_EES6_E'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPFRS3_S4_E'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPKv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEPNS_15basic_streambufIwS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__213basic_ostreamIwNS_11char_traitsIwEEElsEb'}
@@ -981,9 +941,6 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214__shared_countD2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEE4swapERS3_'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEEC1EPNS_15basic_streambufIcS2_EE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEEC2EPNS_15basic_streambufIcS2_EE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED0Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__214basic_iostreamIcNS_11char_traitsIcEEED2Ev'}
@@ -1023,36 +980,18 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structC2Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215__thread_structD2Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE10pubseekoffExNS_8ios_base7seekdirEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE10pubseekposENS_4fposI11__mbstate_tEEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4setgEPcS4_S4_'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4setpEPcS4_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE4syncEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5gbumpEi'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5imbueERKNS_6localeE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5pbumpEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5sgetcEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5sgetnEPcl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5sputcEc'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5sputnEPKcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE5uflowEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6sbumpcEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6setbufEPcl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6snextcEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsgetnEPcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE6xsputnEPKcl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7pubsyncEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekoffExNS_8ios_base7seekdirEj'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7seekposENS_4fposI11__mbstate_tEEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE7sungetcEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8in_availEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8overflowEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9pbackfailEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9pubsetbufEPcl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9showmanycEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9sputbackcEc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEE9underflowEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1ERKS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEC1Ev'}
@@ -1062,36 +1001,18 @@
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED1Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEED2Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIcNS_11char_traitsIcEEEaSERKS3_'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE10pubseekoffExNS_8ios_base7seekdirEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE10pubseekposENS_4fposI11__mbstate_tEEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4setgEPwS4_S4_'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4setpEPwS4_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4swapERS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE4syncEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5gbumpEi'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5imbueERKNS_6localeE'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5pbumpEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5sgetcEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5sgetnEPwl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5sputcEw'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5sputnEPKwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE5uflowEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6sbumpcEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6setbufEPwl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6snextcEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsgetnEPwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE6xsputnEPKwl'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7pubsyncEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekoffExNS_8ios_base7seekdirEj'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7seekposENS_4fposI11__mbstate_tEEj'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE7sungetcEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8in_availEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8overflowEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE8pubimbueERKNS_6localeE'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9pbackfailEi'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9pubsetbufEPwl'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9showmanycEv'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9sputbackcEw'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEE9underflowEv'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1ERKS3_'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__215basic_streambufIwNS_11char_traitsIwEEEC1Ev'}
@@ -1481,10 +1402,6 @@
 {'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0}
 {'type': 'OBJECT', 'is_defined': True, 'name': '__ZNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImE6resizeEmm'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImEC1Em'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImEC2Em'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImED1Ev'}
-{'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__28valarrayImED2Ev'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_prepERNS_8ios_baseERc'}
 {'type': 'FUNC', 'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_'}
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -702,12 +702,6 @@
 #define _LIBCPP_TEMPLATE_VIS
 #define _LIBCPP_ENUM_VIS
 
-#if defined(_LIBCPP_COMPILER_MSVC)
-#  define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline
-#else
-#  define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__ ((__always_inline__))
-#endif
-
 #endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
 
 #ifndef _LIBCPP_HIDDEN
@@ -801,17 +795,31 @@
 #  define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE
 #endif
 
-// Just so we can migrate to _LIBCPP_HIDE_FROM_ABI gradually.
-#define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
-
-#ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
-#  if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
-#    define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__visibility__("default"), __always_inline__))
+// _LIBCPP_HIDE_FROM_ABI_AFTER_XXX controls whether a symbol is part of the ABI
+// based on the ABI version used to build libc++. When we build libc++, we either
+// hide the symbol from the ABI (if the symbol is not part of the ABI in the
+// version we're building), or we leave it included. Elsewhere, when we're not
+// building libc++, we always mark those symbols as internal so that programs
+// built using new libc++ headers stop relying on symbols that are removed from
+// the ABI in a future version.
+//
+// Each time we release a new stable version of the ABI, we should create a new
+// _LIBCPP_HIDE_FROM_ABI_AFTER_XXX macro, and we can use it to start removing
+// symbols from the ABI after that stable version.
+#ifdef _LIBCPP_BUILDING_LIBRARY
+#  if _LIBCPP_ABI_VERSION > 1
+#    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
 #  else
-#    define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__((__always_inline__))
+#    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1
 #  endif
+#else
+#  define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
 #endif
 
+// Just so we can migrate to the new macros gradually.
+#define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+#define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+
 #ifndef _LIBCPP_PREFERRED_OVERLOAD
 #  if __has_attribute(__enable_if__)
 #    define _LIBCPP_PREFERRED_OVERLOAD __attribute__ ((__enable_if__(true, "")))
Index: libcxx/docs/DesignDocs/VisibilityMacros.rst
===================================================================
--- libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -46,6 +46,12 @@
   other words, the address of a function marked with this attribute is not
   guaranteed to be the same across translation units.
 
+**_LIBCPP_HIDE_FROM_ABI_AFTER_V1**
+  Mark a function as being hidden from the ABI (per `_LIBCPP_HIDE_FROM_ABI`)
+  when libc++ is built with an ABI version after ABI v1. This macro is used to
+  maintain ABI compatibility for symbols that have been historically exported
+  by libc++ in v1 of the ABI, but we don't want to export in the future.
+
 **_LIBCPP_TYPE_VIS**
   Mark a type's typeinfo, vtable and members as having default visibility.
   This attribute cannot be used on class templates.
@@ -139,15 +145,6 @@
   against the libc++ headers after making `_LIBCPP_TYPE_VIS` and
   `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
 
-**_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY**
-  Mark a member function of a class template as visible and always inline. This
-  macro should only be applied to member functions of class templates that are
-  externally instantiated. It is important that these symbols are not marked
-  as hidden as that will prevent the dylib definition from being found.
-
-  This macro is used to maintain ABI compatibility for symbols that have been
-  historically exported by the libc++ library but are now marked inline.
-
 **_LIBCPP_EXCEPTION_ABI**
   Mark the member functions, typeinfo, and vtable of the type as being exported
   by the libc++ library. This macro must be applied to all *exception types*.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to