[PATCH] D39751: [libc++] Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 09:55:10 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL317816: Add _LIBCPP_INLINE_VISIBILITY to __compressed_pair_elem members (authored by arphaman).

Changed prior to commit:
  https://reviews.llvm.org/D39751?vs=121939&id=122261#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D39751

Files:
  libcxx/trunk/include/memory


Index: libcxx/trunk/include/memory
===================================================================
--- libcxx/trunk/include/memory
+++ libcxx/trunk/include/memory
@@ -2040,11 +2040,12 @@
   typedef const _Tp& const_reference;
 
 #ifndef _LIBCPP_CXX03_LANG
-  constexpr __compressed_pair_elem() : __value_() {}
+  _LIBCPP_INLINE_VISIBILITY constexpr __compressed_pair_elem() : __value_() {}
 
   template <class _Up, class = typename enable_if<
       !is_same<__compressed_pair_elem, typename decay<_Up>::type>::value
   >::type>
+  _LIBCPP_INLINE_VISIBILITY
   constexpr explicit
   __compressed_pair_elem(_Up&& __u)
       : __value_(_VSTD::forward<_Up>(__u)){};
@@ -2055,11 +2056,13 @@
                          __tuple_indices<_Indexes...>)
       : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
 #else
-  __compressed_pair_elem() : __value_() {}
+  _LIBCPP_INLINE_VISIBILITY __compressed_pair_elem() : __value_() {}
+  _LIBCPP_INLINE_VISIBILITY
   __compressed_pair_elem(_ParamT __p) : __value_(std::forward<_ParamT>(__p)) {}
 #endif
 
-  reference __get() _NOEXCEPT { return __value_; }
+  _LIBCPP_INLINE_VISIBILITY reference __get() _NOEXCEPT { return __value_; }
+  _LIBCPP_INLINE_VISIBILITY
   const_reference __get() const _NOEXCEPT { return __value_; }
 
 private:
@@ -2074,11 +2077,12 @@
   typedef _Tp __value_type;
 
 #ifndef _LIBCPP_CXX03_LANG
-  constexpr __compressed_pair_elem() = default;
+  _LIBCPP_INLINE_VISIBILITY constexpr __compressed_pair_elem() = default;
 
   template <class _Up, class = typename enable_if<
         !is_same<__compressed_pair_elem, typename decay<_Up>::type>::value
   >::type>
+  _LIBCPP_INLINE_VISIBILITY
   constexpr explicit
   __compressed_pair_elem(_Up&& __u)
       : __value_type(_VSTD::forward<_Up>(__u)){};
@@ -2089,12 +2093,14 @@
                          __tuple_indices<_Indexes...>)
       : __value_type(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
 #else
-  __compressed_pair_elem() : __value_type() {}
+  _LIBCPP_INLINE_VISIBILITY __compressed_pair_elem() : __value_type() {}
+  _LIBCPP_INLINE_VISIBILITY
   __compressed_pair_elem(_ParamT __p)
       : __value_type(std::forward<_ParamT>(__p)) {}
 #endif
 
-  reference __get() _NOEXCEPT { return *this; }
+  _LIBCPP_INLINE_VISIBILITY reference __get() _NOEXCEPT { return *this; }
+  _LIBCPP_INLINE_VISIBILITY
   const_reference __get() const _NOEXCEPT { return *this; }
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39751.122261.patch
Type: text/x-patch
Size: 2431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171109/0fdd8c43/attachment.bin>


More information about the cfe-commits mailing list