Commit 2143168e by Fangrui Song Committed by Jonathan Wakely

Use default visibility to work around clang -fvisibility-inlines-hidden bug

Clang (including trunk and many older versions) incorrectly marks static
local variables (__tag) hidden when -fvisibility-inlines-hidden is used.
This can lead to multiple instances of __tag when shares objects are used.

2018-07-20  Fangrui Song  <maskray@google.com>

	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
	_GLIBCXX_VISIBILITY(default).

From-SVN: r262903
parent afa07bdd
2018-07-20 Fangrui Song <maskray@google.com>
* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
_GLIBCXX_VISIBILITY(default).
2018-07-20 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86603
......
......@@ -508,7 +508,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
friend class _Sp_counted_ptr_inplace;
static const type_info&
_S_ti() noexcept
_S_ti() noexcept _GLIBCXX_VISIBILITY(default)
{
alignas(type_info) static constexpr _Sp_make_shared_tag __tag;
return reinterpret_cast<const type_info&>(__tag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment