libstdc++: Use 'inline' consistently in std::exception_ptr [PR 97729]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 9 Nov 2020 10:16:07 +0000 (10:16 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 9 Nov 2020 14:28:38 +0000 (14:28 +0000)
With PR c++/67453 fixed we can rely on the 'used' attribute to emit
inline constructors and destructors in libsupc++/eh_ptr.cc. This means
we don't need to suppress the 'inline' keyword on them in that file, and
don't need to force 'always_inline' on them in other files.

libstdc++-v3/ChangeLog:

PR libstdc++/97729
* libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
(exception_ptr::exception_ptr(const exception_ptr&))
(exception_ptr::~exception_ptr()): Remove 'always_inline'
attributes. Use 'inline' unconditionally.

libstdc++-v3/libsupc++/exception_ptr.h

index 001343a..6ae4d4c 100644 (file)
@@ -174,19 +174,13 @@ namespace std
     };
 
     _GLIBCXX_EH_PTR_USED
-#ifndef  _GLIBCXX_EH_PTR_COMPAT
-    __attribute__((__always_inline__)) // XXX see PR 97729
     inline
-#endif
     exception_ptr::exception_ptr() _GLIBCXX_NOEXCEPT
     : _M_exception_object(0)
     { }
 
     _GLIBCXX_EH_PTR_USED
-#ifndef  _GLIBCXX_EH_PTR_COMPAT
-    __attribute__((__always_inline__))
     inline
-#endif
     exception_ptr::exception_ptr(const exception_ptr& __other) _GLIBCXX_NOEXCEPT
     : _M_exception_object(__other._M_exception_object)
     {
@@ -195,10 +189,7 @@ namespace std
     }
 
     _GLIBCXX_EH_PTR_USED
-#ifndef  _GLIBCXX_EH_PTR_COMPAT
-    __attribute__((__always_inline__))
     inline
-#endif
     exception_ptr::~exception_ptr() _GLIBCXX_USE_NOEXCEPT
     {
       if (_M_exception_object)