[Lldb-commits] [PATCH] D147833: [lldb] Change return type of EventData::GetFlavor

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Apr 8 20:37:53 PDT 2023


JDevlieghere added a comment.

In D147833#4253499 <https://reviews.llvm.org/D147833#4253499>, @bulbazord wrote:

> Yes, we definitely do that in many places. I see your point though, comparing const c-string pointers can get pretty tricky if somebody refactors this in the future. In that case, instead of `GetFlavor` returning a `const char *` or a `ConstString`, it could return a `StringRef` and this should be handled, no? Just like `GetPluginName()` in your example.

I agree with Jason. Strong +1 on making that a StringRef. Comparing pointers is asking for trouble.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147833



More information about the lldb-commits mailing list