[Lldb-commits] [PATCH] D152220: [lldb][NFCI] Change type of Broadcaster's name
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 6 15:36:04 PDT 2023
bulbazord added inline comments.
================
Comment at: lldb/include/lldb/Utility/Broadcaster.h:358-360
+ llvm::StringRef GetBroadcasterName() const {
+ return m_broadcaster.GetBroadcasterName();
}
----------------
JDevlieghere wrote:
> Why not return a `const std::string &` here or, alternatively, why not return a StringRef above?
Good question. IMO it'd be nice to return a StringRef here but it's probably more practical to return a `const std::string &` here since we often pass it to printf-style formatters for logging (which, for StringRef, you'd need to do `ref.str().c_str()` to do it safely).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152220/new/
https://reviews.llvm.org/D152220
More information about the lldb-commits
mailing list