aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lldb-mi/MICmdArgValConsume.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /tools/lldb-mi/MICmdArgValConsume.cpp
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
downloadsrc-5e95aa85bb660d45e9905ef1d7180b2678280660.tar.gz
src-5e95aa85bb660d45e9905ef1d7180b2678280660.zip
Import LLDB as of upstream SVN 241361 (git 612c075f)vendor/lldb/lldb-r241361
Notes
Notes: svn path=/vendor/lldb/dist/; revision=285101 svn path=/vendor/lldb/lldb-r241361/; revision=285102; tag=vendor/lldb/lldb-r241361
Diffstat (limited to 'tools/lldb-mi/MICmdArgValConsume.cpp')
-rw-r--r--tools/lldb-mi/MICmdArgValConsume.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/tools/lldb-mi/MICmdArgValConsume.cpp b/tools/lldb-mi/MICmdArgValConsume.cpp
index 041005567393..c2fe9940d878 100644
--- a/tools/lldb-mi/MICmdArgValConsume.cpp
+++ b/tools/lldb-mi/MICmdArgValConsume.cpp
@@ -7,18 +7,6 @@
//
//===----------------------------------------------------------------------===//
-//++
-// File: MICmdArgValConsume.cpp
-//
-// Overview: CMICmdArgValConsume implementation.
-//
-// Environment: Compilers: Visual C++ 12.
-// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
-// Libraries: See MIReadmetxt.
-//
-// Copyright: None.
-//--
-
// In-house headers:
#include "MICmdArgValConsume.h"
#include "MICmdArgContext.h"
@@ -71,7 +59,7 @@ bool
CMICmdArgValConsume::Validate(CMICmdArgContext &vwArgContext)
{
if (vwArgContext.IsEmpty())
- return MIstatus::success;
+ return m_bMandatory ? MIstatus::failure : MIstatus::success;
// Consume the optional file, line, linenum arguments till the mode '--' argument
const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
@@ -80,15 +68,15 @@ CMICmdArgValConsume::Validate(CMICmdArgContext &vwArgContext)
{
const CMIUtilString & rTxt( *it );
- if ( rTxt.compare( "--" ) == 0 )
+ if ( rTxt.compare( "--" ) == 0 )
{
m_bFound = true;
m_bValid = true;
- return MIstatus::success;
- }
+ return MIstatus::success;
+ }
- if ( !vwArgContext.RemoveArg( rTxt ) )
- return MIstatus::failure;
+ if ( !vwArgContext.RemoveArg( rTxt ) )
+ return MIstatus::failure;
// Next
++it;