Broadcasters don't need their names in the StringPool. It doesn't
benefit from fast comparisons and doesn't benefit from uniqueness.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM modulo inline question.
lldb/include/lldb/Utility/Broadcaster.h | ||
---|---|---|
358–360 | Why not return a const std::string & here or, alternatively, why not return a StringRef above? |
lldb/include/lldb/Utility/Broadcaster.h | ||
---|---|---|
358–360 | 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). |
If we're going to store this as a std::string you should take it it by value and move it into the member.