jasonmolenda added a comment. In D147833#4252681 <https://reviews.llvm.org/D147833#4252681>, @bulbazord wrote:
> In D147833#4252651 <https://reviews.llvm.org/D147833#4252651>, @jasonmolenda > wrote: > >> Am I missing something, how does this work when we have uses like >> `event_data->GetFlavor() == TargetEventData::GetFlavorString()` - is this >> changing from a one-time construction of a ConstString to a construction of >> a ConstString every time it's called by implicit construction? > > `event_data->GetFlavor() == TargetEventData::GetFlavorString()` would be just > a straight pointer comparison, no ConstString in the picture. These strings > don't need to be in the ConstString pool -- they only exist in one place each > and are guaranteed to be there for the lifetime of a running lldb process. > There are other places in lldb where I'd like to do this, but I figured I'd > do it in a few smaller patches rather than one giant patch. OK, I see. I saw the `==` and thought something must be constructed to an object for that operator to work, I didn't even think of address comparing constant data c-strings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147833/new/ https://reviews.llvm.org/D147833 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits