[Lldb-commits] [lldb] d29b567 - [lldb][NFCI] Remove use of ConstString from OptionValueLanguage

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 8 15:12:07 PDT 2023


Author: Alex Langford
Date: 2023-06-08T15:11:22-07:00
New Revision: d29b5673822d2ce7be85c789fd9809f096ec5adc

URL: https://github.com/llvm/llvm-project/commit/d29b5673822d2ce7be85c789fd9809f096ec5adc
DIFF: https://github.com/llvm/llvm-project/commit/d29b5673822d2ce7be85c789fd9809f096ec5adc.diff

LOG: [lldb][NFCI] Remove use of ConstString from OptionValueLanguage

ConstString is simply not needed here.

Differential Revision: https://reviews.llvm.org/D152310

Added: 
    

Modified: 
    lldb/source/Interpreter/OptionValueLanguage.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Interpreter/OptionValueLanguage.cpp b/lldb/source/Interpreter/OptionValueLanguage.cpp
index 1be8a5585bc4d..409fcf882bcbf 100644
--- a/lldb/source/Interpreter/OptionValueLanguage.cpp
+++ b/lldb/source/Interpreter/OptionValueLanguage.cpp
@@ -43,10 +43,8 @@ Status OptionValueLanguage::SetValueFromString(llvm::StringRef value,
 
   case eVarSetOperationReplace:
   case eVarSetOperationAssign: {
-    ConstString lang_name(value.trim());
     LanguageSet languages_for_types = Language::GetLanguagesSupportingTypeSystems();
-    LanguageType new_type =
-        Language::GetLanguageTypeFromString(lang_name.GetStringRef());
+    LanguageType new_type = Language::GetLanguageTypeFromString(value.trim());
     if (new_type && languages_for_types[new_type]) {
       m_value_was_set = true;
       m_current_value = new_type;


        


More information about the lldb-commits mailing list