[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user