Convert many functions to use StringRefs.
Where possible, remove the const char* version. To keep the
risk and impact here minimal, I've only done the simplest
functions.
In the process, I found a few opportunities for adding some
unit tests, so I added those as well.
Tested on Windows, Linux, and OSX.
llvm-svn: 281799
diff --git a/lldb/source/Interpreter/OptionValueLanguage.cpp b/lldb/source/Interpreter/OptionValueLanguage.cpp
index f5505f7..a59419f 100644
--- a/lldb/source/Interpreter/OptionValueLanguage.cpp
+++ b/lldb/source/Interpreter/OptionValueLanguage.cpp
@@ -49,7 +49,7 @@
languages_for_expressions);
LanguageType new_type =
- Language::GetLanguageTypeFromString(lang_name.GetCString());
+ Language::GetLanguageTypeFromString(lang_name.GetStringRef());
if (new_type && languages_for_types.count(new_type)) {
m_value_was_set = true;
m_current_value = new_type;