[Lldb-commits] [lldb] r372572 - [lldb][NFC] Remove dead code in Options::HandleOptionArgumentCompletion

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 23 02:56:53 PDT 2019


Author: teemperor
Date: Mon Sep 23 02:56:53 2019
New Revision: 372572

URL: http://llvm.org/viewvc/llvm-project?rev=372572&view=rev
Log:
[lldb][NFC] Remove dead code in Options::HandleOptionArgumentCompletion

Modified:
    lldb/trunk/source/Interpreter/Options.cpp

Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=372572&r1=372571&r2=372572&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Mon Sep 23 02:56:53 2019
@@ -752,16 +752,9 @@ void Options::HandleOptionArgumentComple
   // See if this is an enumeration type option, and if so complete it here:
 
   const auto &enum_values = opt_defs[opt_defs_index].enum_values;
-  if (!enum_values.empty()) {
-    std::string match_string(
-        request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos),
-        request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos) +
-            request.GetCursorCharPosition());
-
-    for (const auto &enum_value : enum_values) {
+  if (!enum_values.empty())
+    for (const auto &enum_value : enum_values)
       request.TryCompleteCurrentArg(enum_value.string_value);
-    }
-  }
 
   // If this is a source file or symbol type completion, and  there is a -shlib
   // option somewhere in the supplied arguments, then make a search filter for




More information about the lldb-commits mailing list