summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp24
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h8
-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
6 files changed, 46 insertions, 54 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 05e66f38974..8a0d218ab34 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -32,9 +32,6 @@
using namespace lldb;
using namespace lldb_private;
-static const char *pluginName = "ItaniumABILanguageRuntime";
-static const char *pluginDesc = "Itanium ABI for the C++ language";
-static const char *pluginShort = "language.itanium";
static const char *vtable_demangled_prefix = "vtable for ";
bool
@@ -306,8 +303,8 @@ ItaniumABILanguageRuntime::CreateInstance (Process *process, lldb::LanguageType
void
ItaniumABILanguageRuntime::Initialize()
{
- PluginManager::RegisterPlugin (pluginName,
- pluginDesc,
+ PluginManager::RegisterPlugin (GetPluginNameStatic(),
+ "Itanium ABI for the C++ language",
CreateInstance);
}
@@ -317,19 +314,20 @@ ItaniumABILanguageRuntime::Terminate()
PluginManager::UnregisterPlugin (CreateInstance);
}
+lldb_private::ConstString
+ItaniumABILanguageRuntime::GetPluginNameStatic()
+{
+ static ConstString g_name("itanium");
+ return g_name;
+}
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
-const char *
+lldb_private::ConstString
ItaniumABILanguageRuntime::GetPluginName()
{
- return pluginName;
-}
-
-const char *
-ItaniumABILanguageRuntime::GetShortPluginName()
-{
- return pluginShort;
+ return GetPluginNameStatic();
}
uint32_t
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
index c9165f446ee..6b2c437de25 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
@@ -52,15 +52,15 @@ namespace lldb_private {
static lldb_private::LanguageRuntime *
CreateInstance (Process *process, lldb::LanguageType language);
+ static lldb_private::ConstString
+ GetPluginNameStatic();
+
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual const char *
+ virtual lldb_private::ConstString
GetPluginName();
- virtual const char *
- GetShortPluginName();
-
virtual uint32_t
GetPluginVersion();
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