[Lldb-commits] [PATCH] D132395: [lldb] [gdb-remote] Use Communication::WriteAll() over Write()

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 23 09:38:12 PDT 2022


mgorny added a comment.
Herald added a subscriber: JDevlieghere.

In D132395#3742365 <https://reviews.llvm.org/D132395#3742365>, @labath wrote:

>> Ideally, we'd remove Write() from the public API.
>
> That might be a bit too extreme. Although I agree that the "All" version is what one wants in most cases, there are use cases (and plenty of historical precedent) for the other version.

To be honest, I can't think of a real use case where aliasing `Write()` to `WriteAll()` would make a caller-visible difference. I mean, `Write()` could technically write less but isn't guaranteed to, right? So if `Write()` started using `WriteAll()` internally, would there be any real difference, except for the technical difference in how it works internally (and perhaps some performance loss if someone specifically didn't need the `WriteAll()` behavior)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132395/new/

https://reviews.llvm.org/D132395



More information about the lldb-commits mailing list