[cfe-commits] [libcxx] r113590 - in /libcxx/trunk/include: iosfwd memory string vector

Howard Hinnant hhinnant at apple.com
Fri Sep 10 09:42:26 PDT 2010


Author: hhinnant
Date: Fri Sep 10 11:42:26 2010
New Revision: 113590

URL: http://llvm.org/viewvc/llvm-project?rev=113590&view=rev
Log:
I am experimenting with putting visibility-default attributes on all struct/classes in libc++.  This checkin decorates only basic_string and vector as an experiment, and for review by those in this audience that might know more about visibilty than I do.  If I get no negative feedback on this procedure I will begin to decorate the entire library in this way.

Modified:
    libcxx/trunk/include/iosfwd
    libcxx/trunk/include/memory
    libcxx/trunk/include/string
    libcxx/trunk/include/vector

Modified: libcxx/trunk/include/iosfwd
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iosfwd?rev=113590&r1=113589&r2=113590&view=diff
==============================================================================
--- libcxx/trunk/include/iosfwd (original)
+++ libcxx/trunk/include/iosfwd Fri Sep 10 11:42:26 2010
@@ -92,8 +92,8 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-template<class _CharT>  struct char_traits;
-template<class _Tp>     class allocator;
+template<class _CharT>  struct _LIBCPP_VISIBLE char_traits;
+template<class _Tp>     class _LIBCPP_VISIBLE allocator;
 
 template <class _CharT, class _Traits = char_traits<_CharT> > class basic_ios;
 
@@ -164,7 +164,7 @@
 
 template <class _CharT,             // for <stdexcept>
           class _Traits = char_traits<_CharT>,
-          class _Allocator = allocator<_CharT> > class basic_string;
+          class _Allocator = allocator<_CharT> > class _LIBCPP_VISIBLE basic_string;
 typedef basic_string<char, char_traits<char>, allocator<char> > string;
 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
 

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=113590&r1=113589&r2=113590&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Fri Sep 10 11:42:26 2010
@@ -1471,7 +1471,7 @@
 // allocator
 
 template <class _Tp>
-class allocator
+class _LIBCPP_VISIBLE allocator
 {
 public:
     typedef size_t            size_type;

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=113590&r1=113589&r2=113590&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Fri Sep 10 11:42:26 2010
@@ -479,7 +479,7 @@
 // char_traits
 
 template <class _CharT>
-struct char_traits
+struct _LIBCPP_VISIBLE char_traits
 {
     typedef _CharT    char_type;
     typedef int       int_type;
@@ -591,7 +591,7 @@
 // char_traits<char>
 
 template <>
-struct char_traits<char>
+struct _LIBCPP_VISIBLE char_traits<char>
 {
     typedef char      char_type;
     typedef int       int_type;
@@ -933,7 +933,7 @@
 extern template class __basic_string_common<true>;
 
 template<class _CharT, class _Traits, class _Allocator>
-class basic_string
+class _LIBCPP_VISIBLE basic_string
     : private __basic_string_common<true>
 {
 public:

Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=113590&r1=113589&r2=113590&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Fri Sep 10 11:42:26 2010
@@ -419,7 +419,7 @@
 }
 
 template <class _Tp, class _Allocator = allocator<_Tp> >
-class vector
+class _LIBCPP_VISIBLE vector
     : private __vector_base<_Tp, _Allocator>
 {
 private:
@@ -1682,7 +1682,7 @@
 template <class _Allocator> struct hash<vector<bool, _Allocator> >;
 
 template <class _Allocator>
-class vector<bool, _Allocator>
+class _LIBCPP_VISIBLE vector<bool, _Allocator>
     : private __vector_base_common<true>
 {
 public:





More information about the cfe-commits mailing list