aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/OperatingSystem/Python
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2021-10-18 10:39:58 +0200
committerPavel Labath <pavel@labath.sk>2021-10-21 12:58:45 +0200
commit2ace1e5753a49195ca17f3e175c7e189cf147760 (patch)
treeb325dc674709615db76b8826d1edb7e48ec6f209 /lldb/source/Plugins/OperatingSystem/Python
parent898e80964c950fb49a133ff6018079fe8a7c922b (diff)
downloadllvm-2ace1e5753a49195ca17f3e175c7e189cf147760.zip
llvm-2ace1e5753a49195ca17f3e175c7e189cf147760.tar.gz
llvm-2ace1e5753a49195ca17f3e175c7e189cf147760.tar.bz2
[lldb] Remove ConstString from GetPluginNameStatic of some plugins
This patch deals with ObjectFile, ObjectContainer and OperatingSystem plugins. I'll convert the other types in separate patches. In order to enable piecemeal conversion, I am leaving some ConstStrings in the lowest PluginManager layers. I'll convert those as the last step. Differential Revision: https://reviews.llvm.org/D112061
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python')
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp7
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h8
2 files changed, 4 insertions, 11 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index 570c9aa..7d14f02 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -65,12 +65,7 @@ OperatingSystem *OperatingSystemPython::CreateInstance(Process *process,
return nullptr;
}
-ConstString OperatingSystemPython::GetPluginNameStatic() {
- static ConstString g_name("python");
- return g_name;
-}
-
-const char *OperatingSystemPython::GetPluginDescriptionStatic() {
+llvm::StringRef OperatingSystemPython::GetPluginDescriptionStatic() {
return "Operating system plug-in that gathers OS information from a python "
"class that implements the necessary OperatingSystem functionality.";
}
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
index e343285..7800cf0 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
@@ -36,14 +36,12 @@ public:
static void Terminate();
- static lldb_private::ConstString GetPluginNameStatic();
+ static llvm::StringRef GetPluginNameStatic() { return "python"; }
- static const char *GetPluginDescriptionStatic();
+ static llvm::StringRef GetPluginDescriptionStatic();
// lldb_private::PluginInterface Methods
- llvm::StringRef GetPluginName() override {
- return GetPluginNameStatic().GetStringRef();
- }
+ llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
// lldb_private::OperatingSystem Methods
bool UpdateThreadList(lldb_private::ThreadList &old_thread_list,