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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to