aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-06-14 18:44:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-25 11:51:07 +0000
commit8a74220dbb02930328b37ba1c5ebcf7280304722 (patch)
tree06ec4160d502eee68376a1dff6902015b272bf52
parent57f6f33bd111ff512c0df22104671f3bc85add3d (diff)
downloadsrc-8a74220dbb02930328b37ba1c5ebcf7280304722.tar.gz
src-8a74220dbb02930328b37ba1c5ebcf7280304722.zip
Apply upstream libc++ fix to allow building with devel/xxx-xtoolchain-gcc
Merge commit 52e9d80d5db2 from llvm git (by Jason Liu): [libc++] add `inline` for __open's definition in ifstream and ofstream Summary: When building with gcc on AIX, it seems that gcc does not like the `always_inline` without the `inline` keyword. So adding the inline keywords in for __open in ifstream and ofstream. That will also make it consistent with __open in basic_filebuf (it seems we added `inline` there before for gcc build as well). Differential Revision: https://reviews.llvm.org/D99422 PR: 255570 MFC after: 6 weeks (cherry picked from commit d099db25464b826c5724cf2fb5b22292bbe15f6e)
-rw-r--r--contrib/llvm-project/libcxx/include/fstream6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm-project/libcxx/include/fstream b/contrib/llvm-project/libcxx/include/fstream
index d7d6b46c32d9..7b1bbfe16c01 100644
--- a/contrib/llvm-project/libcxx/include/fstream
+++ b/contrib/llvm-project/libcxx/include/fstream
@@ -244,7 +244,7 @@ public:
return open(__p.c_str(), __mode);
}
#endif
- inline _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY
basic_filebuf* __open(int __fd, ios_base::openmode __mode);
#endif
basic_filebuf* close();
@@ -574,7 +574,7 @@ basic_filebuf<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode)
}
template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline
basic_filebuf<_CharT, _Traits>*
basic_filebuf<_CharT, _Traits>::__open(int __fd, ios_base::openmode __mode) {
basic_filebuf<_CharT, _Traits>* __rt = nullptr;
@@ -1326,6 +1326,7 @@ basic_ifstream<_CharT, _Traits>::open(const string& __s, ios_base::openmode __mo
}
template <class _CharT, class _Traits>
+inline
void basic_ifstream<_CharT, _Traits>::__open(int __fd,
ios_base::openmode __mode) {
if (__sb_.__open(__fd, __mode | ios_base::in))
@@ -1539,6 +1540,7 @@ basic_ofstream<_CharT, _Traits>::open(const string& __s, ios_base::openmode __mo
}
template <class _CharT, class _Traits>
+inline
void basic_ofstream<_CharT, _Traits>::__open(int __fd,
ios_base::openmode __mode) {
if (__sb_.__open(__fd, __mode | ios_base::out))