[Lldb-commits] [PATCH] D122848: Reduce extraneous temp strings in debugserver, free objects when they're not longer needed
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 31 14:51:53 PDT 2022
jasonmolenda added inline comments.
================
Comment at: lldb/tools/debugserver/source/RNBRemote.cpp:588
+ stream.str(std::string());
+ stream.clear();
return SendPacket(payload);
----------------
JDevlieghere wrote:
> `clear` doesn't do what you think it does, it modifies the state flag which isn't relevant here.
Yeah I know, the common idiom for clearing an ostringstream is to .str("") an then .clear() to clear flag state, I was only clear'ing to be proper, even though we don't use the object past this point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122848/new/
https://reviews.llvm.org/D122848
More information about the lldb-commits
mailing list