This revision was automatically updated to reflect the committed changes.
lawrence_danna marked an inline comment as done.
Closed by commit rL373285: File::Clear() -> File::TakeStreamAndClear()
(authored by lawrence_danna, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: ll
lawrence_danna updated this revision to Diff 222459.
lawrence_danna added a comment.
review fix
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68160/new/
https://reviews.llvm.org/D68160
Files:
lldb/include/lldb/Host/File.h
lldb/scripts/Python/p
lawrence_danna marked 2 inline comments as done.
lawrence_danna added inline comments.
Comment at: lldb/source/Host/common/File.cpp:166-167
+FILE *File::TakeStreamAndClear() {
+ GetStream();
+ FILE *stream = m_stream;
+ m_stream = NULL;
labath wrote:
> `FILE *
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
Sounds good. If this were a more permanent interface, I'd argue that the
function should be called `TakeStream` (in analogy with
`llvm::Expected::takeError`), but for a temporary thing that do
lawrence_danna created this revision.
lawrence_danna added reviewers: JDevlieghere, jasonmolenda, labath.
Herald added a project: LLDB.
File::Clear() is an ugly function. It's only used in one place,
which is the swig typemaps for FILE*. This patch refactors and
renames that function to make it