Fix std::string::data() symbol during library build.

The non-const data() member of std::string is only exposed
in C++17 and beyond. However std::string is externally instantiated
and so the member function needs to be exposed to be externally instantiated.

On Linux and OS X this shouldn't cause a problem, because
_LIBCPP_INLINE_VISIBILITY ensures the symbol is always inlined.

However on Windows, the symbol gets marked dllimport, but
there is no definition to import, causing link errors.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318690 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed