[lldb][nfc] Move broadcaster class strings away from ConstString (#89690)

These are hardcoded strings that are already present in the data section
of the binary, no need to immediately place them in the ConstString
StringPools. Lots of code still calls `GetBroadcasterClass` and places
the return value into a ConstString. Changing that would be a good
follow-up.

Additionally, calls to these functions are still wrapped in ConstStrings
at the SBAPI layer. This is because we must guarantee the lifetime of
all strings handed out publicly.
This commit is contained in:
Alex Langford authored and GitHub committed 2024-04-24 12:13:18 -07:00
1 parent 2575cd8a90
commit 5779483527
23 files changed
+50 -47

No files matched your search

+2 -2
View File
@@ -77,7 +77,7 @@ SBProcess::~SBProcess() = default;
const char *SBProcess::GetBroadcasterClassName() {
LLDB_INSTRUMENT();
return Process::GetStaticBroadcasterClass().AsCString();
return ConstString(Process::GetStaticBroadcasterClass()).AsCString();
}
const char *SBProcess::GetPluginName() {
@@ -807,7 +807,7 @@ SBBroadcaster SBProcess::GetBroadcaster() const {
const char *SBProcess::GetBroadcasterClass() {
LLDB_INSTRUMENT();
return Process::GetStaticBroadcasterClass().AsCString();
return ConstString(Process::GetStaticBroadcasterClass()).AsCString();
}
size_t SBProcess::ReadMemory(addr_t addr, void *dst, size_t dst_len,