Cleanup: move visibility/linkage attributes to the first declaration.

http://reviews.llvm.org/D15404

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@267093 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/queue b/include/queue
index 2509b93..c657b52 100644
--- a/include/queue
+++ b/include/queue
@@ -436,45 +436,56 @@
     _LIBCPP_INLINE_VISIBILITY
     explicit priority_queue(const value_compare& __comp)
         : c(), comp(__comp) {}
+    _LIBCPP_INLINE_VISIBILITY
     priority_queue(const value_compare& __comp, const container_type& __c);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     explicit priority_queue(const value_compare& __comp, container_type&& __c);
 #endif
     template <class _InputIter>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp = value_compare());
     template <class _InputIter>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, const container_type& __c);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _InputIter>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, container_type&& __c);
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         explicit priority_queue(const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, const container_type& __c,
                        const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(const priority_queue& __q, const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, container_type&& __c,
                        const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
     template <class _Alloc>
+        _LIBCPP_INLINE_VISIBILITY
         priority_queue(priority_queue&& __q, const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type* = 0);
@@ -487,22 +498,26 @@
     _LIBCPP_INLINE_VISIBILITY
     const_reference top() const   {return c.front();}
 
+    _LIBCPP_INLINE_VISIBILITY
     void push(const value_type& __v);
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     void push(value_type&& __v);
 #ifndef _LIBCPP_HAS_NO_VARIADICS
-    template <class... _Args> void emplace(_Args&&... __args);
+    template <class... _Args> _LIBCPP_INLINE_VISIBILITY void emplace(_Args&&... __args);
 #endif
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
     void pop();
 
+    _LIBCPP_INLINE_VISIBILITY
     void swap(priority_queue& __q)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&
                    __is_nothrow_swappable<value_compare>::value);
 };
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp,
                                                           const container_type& __c)
     : c(__c),
@@ -514,7 +529,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
                                                           container_type&& __c)
     : c(_VSTD::move(__c)),
@@ -527,7 +542,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
                                                           const value_compare& __comp)
     : c(__f, __l),
@@ -538,7 +553,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
                                                           const value_compare& __comp,
                                                           const container_type& __c)
@@ -553,7 +568,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
                                                           const value_compare& __comp,
                                                           container_type&& __c)
@@ -568,7 +583,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
                                                          _Alloc>::value>::type*)
@@ -578,7 +593,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
                                                           const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
@@ -590,7 +605,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
                                                           const container_type& __c,
                                                           const _Alloc& __a,
@@ -604,7 +619,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue& __q,
                                                           const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
@@ -619,7 +634,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
                                                           container_type&& __c,
                                                           const _Alloc& __a,
@@ -633,7 +648,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
                                                           const _Alloc& __a,
                        typename enable_if<uses_allocator<container_type,
@@ -647,7 +662,7 @@
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
 {
@@ -658,7 +673,7 @@
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
 {
@@ -670,7 +685,7 @@
 
 template <class _Tp, class _Container, class _Compare>
 template <class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
 {
@@ -682,7 +697,7 @@
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 priority_queue<_Tp, _Container, _Compare>::pop()
 {
@@ -691,7 +706,7 @@
 }
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
 void
 priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&