hiraditya updated this revision to Diff 75915.
hiraditya added a comment.

Added macro to keep the definition of destructor of basic_string in string.cpp


https://reviews.llvm.org/D25624

Files:
  libcxx/include/string
  libcxx/src/string.cpp


Index: libcxx/src/string.cpp
===================================================================
--- libcxx/src/string.cpp
+++ libcxx/src/string.cpp
@@ -7,6 +7,8 @@
 //
 
//===----------------------------------------------------------------------===//
 
+#define _LIBCPP_HEADER_INLINE_VISIBILITY
+
 #include "string"
 #include "cstdlib"
 #include "cwchar"
Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -11,6 +11,10 @@
 #ifndef _LIBCPP_STRING
 #define _LIBCPP_STRING
 
+#ifndef _LIBCPP_HEADER_INLINE_VISIBILITY
+#define _LIBCPP_HEADER_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
+#endif
+
 /*
     string synopsis
 
@@ -1834,6 +1838,7 @@
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template <class _CharT, class _Traits, class _Allocator>
+inline _LIBCPP_HEADER_INLINE_VISIBILITY
 basic_string<_CharT, _Traits, _Allocator>::~basic_string()
 {
 #if _LIBCPP_DEBUG_LEVEL >= 2


Index: libcxx/src/string.cpp
===================================================================
--- libcxx/src/string.cpp
+++ libcxx/src/string.cpp
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define _LIBCPP_HEADER_INLINE_VISIBILITY
+
 #include "string"
 #include "cstdlib"
 #include "cwchar"
Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -11,6 +11,10 @@
 #ifndef _LIBCPP_STRING
 #define _LIBCPP_STRING
 
+#ifndef _LIBCPP_HEADER_INLINE_VISIBILITY
+#define _LIBCPP_HEADER_INLINE_VISIBILITY _LIBCPP_INLINE_VISIBILITY
+#endif
+
 /*
     string synopsis
 
@@ -1834,6 +1838,7 @@
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
 template <class _CharT, class _Traits, class _Allocator>
+inline _LIBCPP_HEADER_INLINE_VISIBILITY
 basic_string<_CharT, _Traits, _Allocator>::~basic_string()
 {
 #if _LIBCPP_DEBUG_LEVEL >= 2
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to