summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp26
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h8
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp26
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h8
4 files changed, 31 insertions, 37 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 76398f54886..0de4cb9428f 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -37,11 +37,6 @@
using namespace lldb;
using namespace lldb_private;
-static const char *pluginName = "AppleObjCRuntimeV1";
-static const char *pluginDesc = "Apple Objective C Language Runtime - Version 1";
-static const char *pluginShort = "language.apple.objc.v1";
-
-
AppleObjCRuntimeV1::AppleObjCRuntimeV1(Process *process) :
AppleObjCRuntime (process),
m_hash_signature (),
@@ -96,8 +91,8 @@ AppleObjCRuntimeV1::CreateInstance (Process *process, lldb::LanguageType languag
void
AppleObjCRuntimeV1::Initialize()
{
- PluginManager::RegisterPlugin (pluginName,
- pluginDesc,
+ PluginManager::RegisterPlugin (GetPluginNameStatic(),
+ "Apple Objective C Language Runtime - Version 1",
CreateInstance);
}
@@ -107,19 +102,20 @@ AppleObjCRuntimeV1::Terminate()
PluginManager::UnregisterPlugin (CreateInstance);
}
+lldb_private::ConstString
+AppleObjCRuntimeV1::GetPluginNameStatic()
+{
+ static ConstString g_name("apple-objc-v1");
+ return g_name;
+}
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
-const char *
+ConstString
AppleObjCRuntimeV1::GetPluginName()
{
- return pluginName;
-}
-
-const char *
-AppleObjCRuntimeV1::GetShortPluginName()
-{
- return pluginShort;
+ return GetPluginNameStatic();
}
uint32_t
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
index af58ac7e768..ba8ecc2bbcb 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
@@ -114,15 +114,15 @@ public:
static lldb_private::LanguageRuntime *
CreateInstance (Process *process, lldb::LanguageType language);
+ static lldb_private::ConstString
+ GetPluginNameStatic();
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual const char *
+ virtual ConstString
GetPluginName();
- virtual const char *
- GetShortPluginName();
-
virtual uint32_t
GetPluginVersion();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index daa566eb2bc..2df1ac9d03b 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -50,10 +50,6 @@
using namespace lldb;
using namespace lldb_private;
-static const char *pluginName = "AppleObjCRuntimeV2";
-static const char *pluginDesc = "Apple Objective C Language Runtime - Version 2";
-static const char *pluginShort = "language.apple.objc.v2";
-
// 2 second timeout when running utility functions
#define UTILITY_FUNCTION_TIMEOUT_USEC 2*1000*1000
@@ -427,8 +423,8 @@ AppleObjCRuntimeV2::CreateInstance (Process *process, LanguageType language)
void
AppleObjCRuntimeV2::Initialize()
{
- PluginManager::RegisterPlugin (pluginName,
- pluginDesc,
+ PluginManager::RegisterPlugin (GetPluginNameStatic(),
+ "Apple Objective C Language Runtime - Version 2",
CreateInstance);
}
@@ -438,19 +434,21 @@ AppleObjCRuntimeV2::Terminate()
PluginManager::UnregisterPlugin (CreateInstance);
}
+lldb_private::ConstString
+AppleObjCRuntimeV2::GetPluginNameStatic()
+{
+ static ConstString g_name("apple-objc-v2");
+ return g_name;
+}
+
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
-const char *
+lldb_private::ConstString
AppleObjCRuntimeV2::GetPluginName()
{
- return pluginName;
-}
-
-const char *
-AppleObjCRuntimeV2::GetShortPluginName()
-{
- return pluginShort;
+ return GetPluginNameStatic();
}
uint32_t
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index ae2e6f35ab0..54cc3b86b1a 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -55,15 +55,15 @@ public:
static lldb_private::LanguageRuntime *
CreateInstance (Process *process, lldb::LanguageType language);
+ static lldb_private::ConstString
+ GetPluginNameStatic();
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual const char *
+ virtual ConstString
GetPluginName();
- virtual const char *
- GetShortPluginName();
-
virtual uint32_t
GetPluginVersion();
OpenPOWER on IntegriCloud