[Lldb-commits] [lldb] [lldb][ConstString] Prevent GetString from constructing a std::string with a nullptr (PR #95175)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 11 14:34:52 PDT 2024
Michael137 wrote:
@bulbazord raised a good question: do we need this API at all?
>From a brief glance it looks like we're mainly using it for the `operator std::string()` conversion operator? Apart from that, there are a couple of other callers which probably could just use one of the C-string based APIs instead. Technically `GetString` has the benefit of getting the string size for the underlying `char const*` out of the string pool, instead of relying on the `std::string` constructor calling `strlen`. But i doubt that's a big win (if at all)
https://github.com/llvm/llvm-project/pull/95175
More information about the lldb-commits
mailing list