[Lldb-commits] [PATCH] D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent()
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 7 05:30:08 PDT 2019
labath added a reviewer: jingham.
labath added a comment.
Adding Jim for the API design aspects.
Two things come to mind here:
- It's unfortunate that we have to add the FileSP overload (and the associated cruft) to every API that used to take a FILE*. I take it that is needed to get rid of the swig typemaps? Is there any way to avoid it?
- shouldn't these APIs be taking an (SB)Stream instead? I am not sure if we have ever specified the difference between (SB)Stream and (SB)File, but if I had to spell that out, I'd say that this it is that a (SB)Stream supports write-only append-only output, while an (SB)File offers a richer set of APIs (combining reads and writes, random access, etc.). In this sense, it looks like both of these APIs should be perfectly fine (now and for the forseeable future) with a (SB)Stream. Should we make a new overload taking a SBStream instead? Jim, do you know why these functions are taking a FILE*. Could it be that they predate SBStream?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68546/new/
https://reviews.llvm.org/D68546
More information about the lldb-commits
mailing list