[Lldb-commits] [PATCH] D31079: Replace std::ofstream with llvm::raw_fd_ostream
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 17 09:49:07 PDT 2017
zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.
In the places where you want to read from an `ifstream` and write to a socket, you might consider using `llvm::sys::fs::copy_file`, declared in `Support/FileSystem.h`. Currently it takes two paths, but all it does is call `openFileForRead()` on the first one and `openFileForWrite()` on the second one to get FDs. So you could probably add an overload that takes two FDs, and have the path version just call the FD version. Then you could call the FD version directly with an FD for your file and an FD for your socket.
https://reviews.llvm.org/D31079
More information about the lldb-commits
mailing list