[Lldb-commits] [PATCH] D24202: [lldb-mi] Fix parsing expressions to evaluate with spaces and optional args

Ed Munoz via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 2 12:43:16 PDT 2016


edmunoz added inline comments.

================
Comment at: tools/lldb-mi/MICmdArgValOptionLong.cpp:190
@@ -189,10 +189,3 @@
 {
-    CMIUtilString::VecString_t vecOptions;
-    MIuint nOptionsPresent = 0;
-    if ((m_eExpectingOptionType != eArgValType_StringQuoted) && (m_eExpectingOptionType != eArgValType_StringQuotedNumber) &&
-        (m_eExpectingOptionType != eArgValType_StringQuotedNumberPath))
-        nOptionsPresent = vrwTxt.GetArgsLeftToParse().Split(" ", vecOptions);
-    else
-        nOptionsPresent = vrwTxt.GetArgsLeftToParse().SplitConsiderQuotes(" ", vecOptions);
-    if (nOptionsPresent == 0)
+    if (vrwTxt.GetNumberArgsPresent() == 0)
         return MIstatus::failure;
----------------
We could use the size of `vrwTxt.GetArgs()` to reduce the number of calls to `CMIUtilString::SplitConsiderQuotes` in `CMICmdArgContext`.

I left it using the more expressive method name, but I'm open to changing it.


Repository:
  rL LLVM

https://reviews.llvm.org/D24202





More information about the lldb-commits mailing list