[lldb] Return StringRef from PluginInterface::GetPluginNameThere is no reason why this function should be returning a ConstString.While modifying these files, I also fixed several instances where
[lldb] Return StringRef from PluginInterface::GetPluginNameThere is no reason why this function should be returning a ConstString.While modifying these files, I also fixed several instances whereGetPluginName and GetPluginNameStatic were returning different strings.I am not changing the return type of GetPluginNameStatic in this patch, as thatwould necessitate additional changes, and this patch is big enough as it is.Differential Revision: https://reviews.llvm.org/D111877
show more ...
[lldb] Reactivate Objective-C++ pluginSummary:Since commit 7b3ef05a37fef2f805d31f498d30198ddeeb1a0c the Objective-C++ plugin is dead code.That commit added Objective-C++ to the list of languages
[lldb] Reactivate Objective-C++ pluginSummary:Since commit 7b3ef05a37fef2f805d31f498d30198ddeeb1a0c the Objective-C++ plugin is dead code.That commit added Objective-C++ to the list of languages for which `Language::LanguageIsCPlusPlus`returns true. As the C++ language plugin also uses that method to figure out if it is responsible for agiven language, the C++ plugin since then also became the plugin that we found when looking fora language plugin for Objective-C++. The only real fallout from that is that the source highlightingfor Objective-C++ files never worked as we always found the C++ plugin which refuses to highlightfiles with Objective-C++ extensions.This patch just adds a special exception for Objective-C++ to the list of languages that are governedby the C++ plugin. Also adds a test that makes sure that we find the right plugin for all C languagetypes and that the highlighting for `.mm` (Objective-C++) and `.m` (Objective-C) files works.I didn't revert 7b3ef05a37fef2f805d31f498d30198ddeeb1a0c as it does make sense to returntrue for Objective-C++ from `Language::LanguageIsCPlusPlus` (e.g., we currently check if we care aboutODR violations by doing `if (Language::LanguageIsCPlusPlus(...))` and this should also work forObjective-C++).Fixes rdar://64420183Reviewers: aprantlReviewed By: aprantlSubscribers: mgorny, abidh, JDevlieghereDifferential Revision: https://reviews.llvm.org/D82109