diff options
author | Pavel Labath <pavel@labath.sk> | 2021-10-15 13:07:39 +0200 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2021-10-18 10:14:42 +0200 |
commit | a3939e159fc9528b097672794035a1cdfda520e8 (patch) | |
tree | 1551cdd6d6c2d8b97bf69b04742b4b4cf0ca07d4 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | |
parent | de4d2f80b75e2a1e4b0ac5c25e20f20839633688 (diff) | |
download | llvm-a3939e159fc9528b097672794035a1cdfda520e8.zip llvm-a3939e159fc9528b097672794035a1cdfda520e8.tar.gz llvm-a3939e159fc9528b097672794035a1cdfda520e8.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index fd4dd1d..b45a221 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -803,10 +803,9 @@ bool DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule( // system. PlatformSP platform_sp(target.GetPlatform()); if (!m_module_sp && platform_sp) { - ConstString platform_name(platform_sp->GetPluginName()); static ConstString g_platform_name( PlatformDarwinKernel::GetPluginNameStatic()); - if (platform_name == g_platform_name) { + if (platform_sp->GetPluginName() == g_platform_name.GetStringRef()) { ModuleSpec kext_bundle_module_spec(module_spec); FileSpec kext_filespec(m_name.c_str()); FileSpecList search_paths = target.GetExecutableSearchPaths(); @@ -1559,11 +1558,6 @@ const char *DynamicLoaderDarwinKernel::GetPluginDescriptionStatic() { "in the MacOSX kernel."; } -// PluginInterface protocol -lldb_private::ConstString DynamicLoaderDarwinKernel::GetPluginName() { - return GetPluginNameStatic(); -} - lldb::ByteOrder DynamicLoaderDarwinKernel::GetByteOrderFromMagic(uint32_t magic) { switch (magic) { |