[lldb] Return StringRef from PluginInterface::GetPluginName
There is no reason why this function should be returning a ConstString. While modifying these files, I also fixed several instances where GetPluginName and GetPluginNameStatic were returning different strings. I am not changing the return type of GetPluginNameStatic in this patch, as that would necessitate additional changes, and this patch is big enough as it is. Differential Revision: https://reviews.llvm.org/D111877
This commit is contained in:
@@ -88,7 +88,7 @@ const char *SBProcess::GetPluginName() {
|
||||
|
||||
ProcessSP process_sp(GetSP());
|
||||
if (process_sp) {
|
||||
return process_sp->GetPluginName().GetCString();
|
||||
return ConstString(process_sp->GetPluginName()).GetCString();
|
||||
}
|
||||
return "<Unknown>";
|
||||
}
|
||||
@@ -98,7 +98,7 @@ const char *SBProcess::GetShortPluginName() {
|
||||
|
||||
ProcessSP process_sp(GetSP());
|
||||
if (process_sp) {
|
||||
return process_sp->GetPluginName().GetCString();
|
||||
return ConstString(process_sp->GetPluginName()).GetCString();
|
||||
}
|
||||
return "<Unknown>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user