[cfe-commits] [libcxx] r114671 - in /libcxx/trunk/include: sstream stack streambuf string strstream system_error thread

Howard Hinnant hhinnant at apple.com
Thu Sep 23 10:31:07 PDT 2010


Author: hhinnant
Date: Thu Sep 23 12:31:07 2010
New Revision: 114671

URL: http://llvm.org/viewvc/llvm-project?rev=114671&view=rev
Log:
visibility-decoration.

Modified:
    libcxx/trunk/include/sstream
    libcxx/trunk/include/stack
    libcxx/trunk/include/streambuf
    libcxx/trunk/include/string
    libcxx/trunk/include/strstream
    libcxx/trunk/include/system_error
    libcxx/trunk/include/thread

Modified: libcxx/trunk/include/sstream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/sstream?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/sstream (original)
+++ libcxx/trunk/include/sstream Thu Sep 23 12:31:07 2010
@@ -182,7 +182,7 @@
 // basic_stringbuf
 
 template <class _CharT, class _Traits, class _Allocator>
-class basic_stringbuf
+class _LIBCPP_VISIBLE basic_stringbuf
     : public basic_streambuf<_CharT, _Traits>
 {
 public:
@@ -525,7 +525,7 @@
 // basic_istringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class basic_istringstream
+class _LIBCPP_VISIBLE basic_istringstream
     : public basic_istream<_CharT, _Traits>
 {
 public:
@@ -644,7 +644,7 @@
 // basic_ostringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class basic_ostringstream
+class _LIBCPP_VISIBLE basic_ostringstream
     : public basic_ostream<_CharT, _Traits>
 {
 public:
@@ -763,7 +763,7 @@
 // basic_stringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class basic_stringstream
+class _LIBCPP_VISIBLE basic_stringstream
     : public basic_iostream<_CharT, _Traits>
 {
 public:

Modified: libcxx/trunk/include/stack
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/stack?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/stack (original)
+++ libcxx/trunk/include/stack Thu Sep 23 12:31:07 2010
@@ -92,7 +92,7 @@
 operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
 
 template <class _Tp, class _Container = deque<_Tp> >
-class stack
+class _LIBCPP_VISIBLE stack
 {
 public:
     typedef _Container                               container_type;
@@ -105,56 +105,76 @@
     container_type c;
 
 public:
+    _LIBCPP_INLINE_VISIBILITY
     stack() : c() {}
+    _LIBCPP_INLINE_VISIBILITY
     explicit stack(const container_type& __c) : c(__c) {}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     explicit stack(container_type&& __c) : c(_STD::move(__c)) {}
+    _LIBCPP_INLINE_VISIBILITY
     stack(stack&& __s) : c(_STD::move(__s.c)) {}
+    _LIBCPP_INLINE_VISIBILITY
     stack& operator=(stack&& __s) {c = _STD::move(__s.c); return *this;}
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         explicit stack(const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0)
             : c(__a) {}
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         stack(const container_type& __c, const _Alloc& __a,
               typename enable_if<uses_allocator<container_type,
                                                 _Alloc>::value>::type* = 0)
             : c(__c, __a) {}
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         stack(const stack& __s, const _Alloc& __a,
               typename enable_if<uses_allocator<container_type,
                                                 _Alloc>::value>::type* = 0)
             : c(__s.c, __a) {}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         stack(container_type&& __c, const _Alloc& __a,
               typename enable_if<uses_allocator<container_type,
                                                 _Alloc>::value>::type* = 0)
             : c(_STD::move(__c), __a) {}
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         stack(stack&& __s, const _Alloc& __a,
               typename enable_if<uses_allocator<container_type,
                                                 _Alloc>::value>::type* = 0)
             : c(_STD::move(__s.c), __a) {}
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
+    _LIBCPP_INLINE_VISIBILITY
     bool empty()     const      {return c.empty();}
+    _LIBCPP_INLINE_VISIBILITY
     size_type size() const      {return c.size();}
+    _LIBCPP_INLINE_VISIBILITY
     reference top()             {return c.back();}
+    _LIBCPP_INLINE_VISIBILITY
     const_reference top() const {return c.back();}
 
+    _LIBCPP_INLINE_VISIBILITY
     void push(const value_type& __v) {c.push_back(__v);}
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     void push(value_type&& __v) {c.push_back(_STD::move(__v));}
 #ifndef _LIBCPP_HAS_NO_VARIADICS
-    template <class... _Args> void emplace(_Args&&... __args)
+    template <class... _Args>
+        _LIBCPP_INLINE_VISIBILITY
+        void emplace(_Args&&... __args)
         {c.emplace_back(_STD::forward<_Args>(__args)...);}
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     void pop() {c.pop_back();}
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(stack& __s)
     {
         using _STD::swap;
@@ -173,7 +193,7 @@
 };
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -181,7 +201,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -189,7 +209,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -197,7 +217,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -205,7 +225,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -213,7 +233,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -221,7 +241,7 @@
 }
 
 template <class _Tp, class _Container>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 void
 swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
 {
@@ -229,7 +249,7 @@
 }
 
 template <class _Tp, class _Container, class _Alloc>
-struct uses_allocator<stack<_Tp, _Container>, _Alloc>
+struct _LIBCPP_VISIBLE uses_allocator<stack<_Tp, _Container>, _Alloc>
     : public uses_allocator<_Container, _Alloc>
 {
 };

Modified: libcxx/trunk/include/streambuf
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/streambuf?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/streambuf (original)
+++ libcxx/trunk/include/streambuf Thu Sep 23 12:31:07 2010
@@ -117,7 +117,7 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
-class basic_streambuf
+class _LIBCPP_VISIBLE basic_streambuf
 {
 public:
     // types:

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Thu Sep 23 12:31:07 2010
@@ -442,7 +442,7 @@
 // fpos
 
 template <class _StateT>
-class fpos
+class _LIBCPP_VISIBLE fpos
 {
 private:
     _StateT __st_;
@@ -628,7 +628,7 @@
 // char_traits<wchar_t>
 
 template <>
-struct char_traits<wchar_t>
+struct _LIBCPP_VISIBLE char_traits<wchar_t>
 {
     typedef wchar_t   char_type;
     typedef wint_t    int_type;
@@ -665,7 +665,7 @@
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
 
 template <>
-struct char_traits<char16_t>
+struct _LIBCPP_VISIBLE char_traits<char16_t>
 {
     typedef char16_t       char_type;
     typedef uint_least16_t int_type;
@@ -771,7 +771,7 @@
 }
 
 template <>
-struct char_traits<char32_t>
+struct _LIBCPP_VISIBLE char_traits<char32_t>
 {
     typedef char32_t       char_type;
     typedef uint_least32_t int_type;
@@ -1058,6 +1058,7 @@
 #endif
     _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s)         {return assign(__s);}
     basic_string& operator=(value_type __c);
+    _LIBCPP_INLINE_VISIBILITY
     basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
 
 #ifndef _LIBCPP_DEBUG
@@ -1092,6 +1093,7 @@
     _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, value_type());}
 
     void reserve(size_type res_arg = 0);
+    _LIBCPP_INLINE_VISIBILITY
     void shrink_to_fit() {reserve();}
     void clear();
     _LIBCPP_INLINE_VISIBILITY bool empty() const {return size() == 0;}
@@ -1127,6 +1129,7 @@
             basic_string&
         >::type
         append(_ForwardIterator __first, _ForwardIterator __last);
+    _LIBCPP_INLINE_VISIBILITY
     basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
 
     void push_back(value_type __c);
@@ -1156,6 +1159,7 @@
             basic_string&
         >::type
         assign(_ForwardIterator __first, _ForwardIterator __last);
+    _LIBCPP_INLINE_VISIBILITY
     basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
 
     basic_string& insert(size_type __pos1, const basic_string& __str);
@@ -1180,6 +1184,7 @@
             iterator
         >::type
         insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
+    _LIBCPP_INLINE_VISIBILITY
     iterator insert(const_iterator __pos, initializer_list<value_type> __il)
                     {return insert(__pos, __il.begin(), __il.end());}
 
@@ -1203,6 +1208,7 @@
             basic_string&
         >::type
         replace(iterator __i1, iterator __i2, _InputIterator __j1, _InputIterator __j2);
+    _LIBCPP_INLINE_VISIBILITY
     basic_string& replace(iterator __i1, iterator __i2, initializer_list<value_type> __il)
         {return replace(__i1, __i2, __il.begin(), __il.end());}
 
@@ -3551,7 +3557,7 @@
                    basic_string<_CharT, _Traits, _Allocator>::npos;
 
 template<class _CharT, class _Traits, class _Allocator>
-struct hash<basic_string<_CharT, _Traits, _Allocator> >
+struct _LIBCPP_VISIBLE hash<basic_string<_CharT, _Traits, _Allocator> >
     : public unary_function<basic_string<_CharT, _Traits, _Allocator>, size_t>
 {
     size_t

Modified: libcxx/trunk/include/strstream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/strstream?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/strstream (original)
+++ libcxx/trunk/include/strstream Thu Sep 23 12:31:07 2010
@@ -135,7 +135,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class strstreambuf
+class _LIBCPP_VISIBLE strstreambuf
     : public streambuf
 {
 public:
@@ -187,20 +187,25 @@
     void __init(char* __gnext, streamsize __n, char* __pbeg);
 };
 
-class istrstream
+class _LIBCPP_VISIBLE istrstream
     : public istream
 {
 public:
+    _LIBCPP_INLINE_VISIBILITY
     explicit istrstream(const char* __s)
         : istream(&__sb_), __sb_(__s, 0) {}
+    _LIBCPP_INLINE_VISIBILITY
     explicit istrstream(char* __s)
         : istream(&__sb_), __sb_(__s, 0) {}
+    _LIBCPP_INLINE_VISIBILITY
     istrstream(const char* __s, streamsize __n)
         : istream(&__sb_), __sb_(__s, __n) {}
+    _LIBCPP_INLINE_VISIBILITY
     istrstream(char* __s, streamsize __n)
         : istream(&__sb_), __sb_(__s, __n) {}
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     istrstream(istrstream&& __rhs)
         : istream(_STD::move(__rhs)),
           __sb_(_STD::move(__rhs.__sb_))
@@ -208,6 +213,7 @@
         istream::set_rdbuf(&__sb_);
     }
 
+    _LIBCPP_INLINE_VISIBILITY
     istrstream& operator=(istrstream&& __rhs)
     {
         istream::operator=(_STD::move(__rhs));
@@ -218,31 +224,37 @@
 
     virtual ~istrstream();
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(istrstream& __rhs)
     {
         istream::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
+    _LIBCPP_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
+    _LIBCPP_INLINE_VISIBILITY
     char *str() {return __sb_.str();}
 
 private:
     strstreambuf __sb_;
 };
 
-class ostrstream
+class _LIBCPP_VISIBLE ostrstream
     : public ostream
 {
 public:
+    _LIBCPP_INLINE_VISIBILITY
     ostrstream()
         : ostream(&__sb_) {}
+    _LIBCPP_INLINE_VISIBILITY
     ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out)
         : ostream(&__sb_),
           __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
         {}
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     ostrstream(ostrstream&& __rhs)
         : ostream(_STD::move(__rhs)),
           __sb_(_STD::move(__rhs.__sb_))
@@ -250,6 +262,7 @@
         ostream::set_rdbuf(&__sb_);
     }
 
+    _LIBCPP_INLINE_VISIBILITY
     ostrstream& operator=(ostrstream&& __rhs)
     {
         ostream::operator=(_STD::move(__rhs));
@@ -260,22 +273,27 @@
 
     virtual ~ostrstream();
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(ostrstream& __rhs)
     {
         ostream::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
+    _LIBCPP_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
+    _LIBCPP_INLINE_VISIBILITY
     void freeze(bool __freezefl = true) {__sb_.freeze(__freezefl);}
+    _LIBCPP_INLINE_VISIBILITY
     char* str()         {return __sb_.str();}
+    _LIBCPP_INLINE_VISIBILITY
     int pcount() const  {return __sb_.pcount();}
 
 private:
     strstreambuf __sb_; // exposition only
 };
 
-class strstream
+class _LIBCPP_VISIBLE strstream
     : public iostream
 {
 public:
@@ -286,14 +304,17 @@
     typedef char_traits<char>::off_type off_type;
 
     // constructors/destructor
+    _LIBCPP_INLINE_VISIBILITY
     strstream()
         : iostream(&__sb_) {}
+    _LIBCPP_INLINE_VISIBILITY
     strstream(char* __s, int __n, ios_base::openmode __mode = ios_base::in | ios_base::out)
         : iostream(&__sb_),
           __sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
         {}
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     strstream(strstream&& __rhs)
         : iostream(_STD::move(__rhs)),
           __sb_(_STD::move(__rhs.__sb_))
@@ -301,6 +322,7 @@
         iostream::set_rdbuf(&__sb_);
     }
 
+    _LIBCPP_INLINE_VISIBILITY
     strstream& operator=(strstream&& __rhs)
     {
         iostream::operator=(_STD::move(__rhs));
@@ -311,6 +333,7 @@
 
     virtual ~strstream();
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(strstream& __rhs)
     {
         iostream::swap(__rhs);
@@ -318,9 +341,13 @@
     }
 
     // Members:
+    _LIBCPP_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
+    _LIBCPP_INLINE_VISIBILITY
     void freeze(bool __freezefl = true) {__sb_.freeze(__freezefl);}
+    _LIBCPP_INLINE_VISIBILITY
     int pcount() const {return __sb_.pcount();}
+    _LIBCPP_INLINE_VISIBILITY
     char* str()        {return __sb_.str();}
 
 private:

Modified: libcxx/trunk/include/system_error
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/system_error (original)
+++ libcxx/trunk/include/system_error Thu Sep 23 12:31:07 2010
@@ -229,12 +229,14 @@
 
 // is_error_code_enum
 
-template <class _Tp> struct is_error_code_enum
+template <class _Tp>
+struct _LIBCPP_VISIBLE is_error_code_enum
     : public false_type {};
 
 // is_error_condition_enum
 
-template <class _Tp> struct is_error_condition_enum
+template <class _Tp>
+struct _LIBCPP_VISIBLE is_error_condition_enum
     : public false_type {};
 
 // Some error codes are not present on all platforms, so we provide equivalents
@@ -342,15 +344,19 @@
 
     _ __v_;
 
+    _LIBCPP_ALWAYS_INLINE
     errc(_ __v) : __v_(__v) {}
+    _LIBCPP_ALWAYS_INLINE
     operator int() const {return __v_;}
 
 };
 
-template <> struct is_error_condition_enum<errc>
+template <>
+struct _LIBCPP_VISIBLE is_error_condition_enum<errc>
     : true_type { };
 
-template <> struct is_error_condition_enum<errc::_>
+template <>
+struct _LIBCPP_VISIBLE is_error_condition_enum<errc::_>
     : true_type { };
 
 class error_condition;
@@ -360,7 +366,7 @@
 
 class __do_message;
 
-class error_category
+class _LIBCPP_VISIBLE error_category
 {
 public:
     virtual ~error_category();
@@ -399,7 +405,7 @@
 const error_category& generic_category();
 const error_category& system_category();
 
-class error_condition
+class _LIBCPP_VISIBLE error_condition
 {
     int __val_;
     const error_category* __cat_;
@@ -469,7 +475,7 @@
 
 // error_code
 
-class error_code
+class _LIBCPP_VISIBLE error_code
 {
     int __val_;
     const error_category* __cat_;
@@ -588,9 +594,10 @@
 operator!=(const error_condition& __x, const error_condition& __y) {return !(__x == __y);}
 
 template <>
-struct hash<error_code>
+struct _LIBCPP_VISIBLE hash<error_code>
     : public unary_function<error_code, size_t>
 {
+    _LIBCPP_INLINE_VISIBILITY
     size_t operator()(const error_code& __ec) const
     {
         return static_cast<size_t>(__ec.value());
@@ -599,7 +606,7 @@
 
 // system_error
 
-class system_error
+class _LIBCPP_VISIBLE system_error
     : public runtime_error
 {
     error_code __ec_;

Modified: libcxx/trunk/include/thread
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/thread?rev=114671&r1=114670&r2=114671&view=diff
==============================================================================
--- libcxx/trunk/include/thread (original)
+++ libcxx/trunk/include/thread Thu Sep 23 12:31:07 2010
@@ -118,8 +118,11 @@
     __thread_specific_ptr();
     ~__thread_specific_ptr();
 
+    _LIBCPP_INLINE_VISIBILITY
     pointer get() const {return static_cast<_Tp*>(pthread_getspecific(__key_));}
+    _LIBCPP_INLINE_VISIBILITY
     pointer operator*() const {return *get();}
+    _LIBCPP_INLINE_VISIBILITY
     pointer operator->() const {return get();}
     pointer release();
     void reset(pointer __p = nullptr);
@@ -175,7 +178,7 @@
 
 }  // this_thread
 
-class __thread_id
+class _LIBCPP_VISIBLE __thread_id
 {
     // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
     // NULL is the no-thread value on Darwin.  Someone needs to check
@@ -183,40 +186,50 @@
     pthread_t __id_;
 
 public:
+    _LIBCPP_INLINE_VISIBILITY
     __thread_id() : __id_(0) {}
 
-    friend bool operator==(__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator==(__thread_id __x, __thread_id __y)
         {return __x.__id_ == __y.__id_;}
-    friend bool operator!=(__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator!=(__thread_id __x, __thread_id __y)
         {return !(__x == __y);}
-    friend bool operator< (__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator< (__thread_id __x, __thread_id __y)
         {return __x.__id_ < __y.__id_;}
-    friend bool operator<=(__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator<=(__thread_id __x, __thread_id __y)
         {return !(__y < __x);}
-    friend bool operator> (__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator> (__thread_id __x, __thread_id __y)
         {return   __y < __x ;}
-    friend bool operator>=(__thread_id __x, __thread_id __y)
+    friend _LIBCPP_INLINE_VISIBILITY
+        bool operator>=(__thread_id __x, __thread_id __y)
         {return !(__x < __y);}
 
     template<class _CharT, class _Traits>
     friend
+    _LIBCPP_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id)
         {return __os << __id.__id_;}
 
 private:
+    _LIBCPP_INLINE_VISIBILITY
     __thread_id(pthread_t __id) : __id_(__id) {}
 
     friend __thread_id this_thread::get_id();
-    friend class thread;
+    friend class _LIBCPP_VISIBLE thread;
 };
 
 template<class _Tp> struct hash;
 
 template<>
-struct hash<__thread_id>
+struct _LIBCPP_VISIBLE hash<__thread_id>
     : public unary_function<__thread_id, size_t>
 {
+    _LIBCPP_INLINE_VISIBILITY
     size_t operator()(__thread_id __v) const
     {
         const size_t* const __p = reinterpret_cast<const size_t*>(&__v);
@@ -227,7 +240,7 @@
 namespace this_thread
 {
 
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 __thread_id
 get_id()
 {
@@ -236,7 +249,7 @@
 
 }  // this_thread
 
-class thread
+class _LIBCPP_VISIBLE thread
 {
     pthread_t __t_;
 
@@ -251,6 +264,7 @@
     typedef __thread_id id;
     typedef pthread_t native_handle_type;
 
+    _LIBCPP_INLINE_VISIBILITY
     thread() : __t_(0) {}
 #ifndef _LIBCPP_HAS_NO_VARIADICS
     template <class _F, class ..._Args,
@@ -266,16 +280,21 @@
     ~thread();
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     thread(thread&& __t) : __t_(__t.__t_) {__t.__t_ = 0;}
     thread& operator=(thread&& __t);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(thread& __t) {_STD::swap(__t_, __t.__t_);}
 
+    _LIBCPP_INLINE_VISIBILITY
     bool joinable() const {return __t_ != 0;}
     void join();
     void detach();
+    _LIBCPP_INLINE_VISIBILITY
     id get_id() const {return __t_;}
+    _LIBCPP_INLINE_VISIBILITY
     native_handle_type native_handle() {return __t_;}
 
     static unsigned hardware_concurrency();
@@ -345,7 +364,7 @@
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 thread&
 thread::operator=(thread&& __t)
 {
@@ -358,7 +377,7 @@
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 void swap(thread& __x, thread& __y) {__x.swap(__y);}
 
 namespace this_thread
@@ -390,7 +409,7 @@
 }
 
 template <class _Duration>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 void
 sleep_until(const chrono::time_point<chrono::monotonic_clock, _Duration>& __t)
 {
@@ -398,7 +417,7 @@
     sleep_for(__t - monotonic_clock::now());
 }
 
-inline
+inline _LIBCPP_INLINE_VISIBILITY
 void yield() {sched_yield();}
 
 }  // this_thread





More information about the cfe-commits mailing list