[Lldb-commits] [PATCH] D152310: [lldb][NFCI] Remove use of ConstString from OptionValueLanguage

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd29b5673822d: [lldb][NFCI] Remove use of ConstString from OptionValueLanguage (authored by bulbazord).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152310/new/

https://reviews.llvm.org/D152310

Files:
  lldb/source/Interpreter/OptionValueLanguage.cpp


Index: lldb/source/Interpreter/OptionValueLanguage.cpp
===================================================================
--- lldb/source/Interpreter/OptionValueLanguage.cpp
+++ lldb/source/Interpreter/OptionValueLanguage.cpp
@@ -43,10 +43,8 @@
 
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152310.529741.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230608/dd3a0fdc/attachment.bin>


More information about the lldb-commits mailing list