LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 50734 - [libc++] Merge 52e9d80d5db20f23979e409f958736d130387f9e into 12.0.1
Summary: [libc++] Merge 52e9d80d5db20f23979e409f958736d130387f9e into 12.0.1
Status: RESOLVED FIXED
Alias: None
Product: libc++
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: 12.0
Hardware: All All
: P normal
Assignee: Louis Dionne
URL:
Keywords:
Depends on:
Blocks: release-12.0.1
  Show dependency tree
 
Reported: 2021-06-16 02:42 PDT by Dimitry Andric
Modified: 2021-06-22 11:56 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s): 52e9d80d5db20f23979e409f958736d130387f9e 0680e2b5a118


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2021-06-16 02:42:31 PDT
Please merge https://github.com/llvm/llvm-project/commit/52e9d80d5db20f23979e409f958736d130387f9e into 12.0.1.

This enables libc++'s <fstream> to be used with gcc, which will otherwise complain with "function body not available" (which is, admittedly, a rather obscure error):

In file included from /workspace/src/contrib/llvm-project/libcxx/src/filesystem/operations.cpp:39:
/workspace/src/contrib/llvm-project/libcxx/include/fstream: In function 'bool std::__1::__fs::filesystem::detail::{anonymous}::copy_file_impl(std::__1::__fs::filesystem::detail::{anonymous}::FileDescriptor&, std::__1::__fs::filesystem::detail::{anonymous}::FileDescriptor&, std::__1::error_code&)':
/workspace/src/contrib/llvm-project/libcxx/include/fstream:1329:6: error: inlining failed in call to always_inline 'void std::__1::basic_ifstream<_CharT, _Traits>::__open(int, std::__1::ios_base::openmode) [with _CharT = char; _Traits = std::__1::char_traits<char>]': function body not available
 1329 | void basic_ifstream<_CharT, _Traits>::__open(int __fd,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workspace/src/contrib/llvm-project/libcxx/src/filesystem/operations.cpp:778:14: note: called from here
  778 |     in.__open(read_fd.fd, ios::binary);
      |     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Louis Dionne 2021-06-17 06:24:43 PDT
https://reviews.llvm.org/D104456
Comment 2 Tom Stellard 2021-06-22 11:56:33 PDT
Merged: 0680e2b5a118