lawrence_danna marked 2 inline comments as done.
lawrence_danna added inline comments.
================
Comment at: lldb/source/API/SBFile.cpp:20-26
+void SBFile::SetStream(FILE *file, bool transfer_ownership) {
+ m_opaque_up = std::make_unique<File>(file, transfer_ownership);
+}
+
+void SBFile::SetDescriptor(int fd, bool transfer_owndership) {
+ m_opaque_up = std::make_unique<File>(fd, transfer_owndership);
+}
----------------
labath wrote:
> I think it would be better if these were constructors instead of member
> functions. That way you might be able to get rid of the all the `if
> (!m_opaque_up) {` checks as the File member will always be initialized.
Unfortunately, SWIG does not allow return types that don't have default
constructors.
https://github.com/swig/swig/issues/1062
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67793/new/
https://reviews.llvm.org/D67793
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits