summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp117
1 files changed, 63 insertions, 54 deletions
diff --git a/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp b/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
index d5bdfa0fa2c..cd403aa8fd4 100644
--- a/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
+++ b/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
@@ -11,110 +11,119 @@
#include "MICmdArgValOptionShort.h"
#include "MICmdArgContext.h"
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmdArgValOptionShort constructor.
// Type: Method.
// Args: None.
// Return: None.
// Throws: None.
//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort()
-{
-}
+CMICmdArgValOptionShort::CMICmdArgValOptionShort() {}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmdArgValOptionShort constructor.
// Type: Method.
// Args: vrArgName - (R) Argument's name to search by.
-// vbMandatory - (R) True = Yes must be present, false = optional argument.
-// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.
+// vbMandatory - (R) True = Yes must be present, false = optional
+// argument.
+// vbHandleByCmd - (R) True = Command processes *this option, false =
+// not handled.
// Return: None.
// Throws: None.
//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd)
- : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd)
-{
-}
+CMICmdArgValOptionShort::CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
+ const bool vbMandatory,
+ const bool vbHandleByCmd)
+ : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd) {}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmdArgValOptionLong constructor.
// Type: Method.
// Args: vrArgName - (R) Argument's name to search by.
-// vbMandatory - (R) True = Yes must be present, false = optional argument.
-// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.
-// veType - (R) The type of argument to look for and create argument object of a certain type.
-// vnExpectingNOptions - (R) The number of options expected to read following *this argument.
+// vbMandatory - (R) True = Yes must be present, false =
+// optional argument.
+// vbHandleByCmd - (R) True = Command processes *this option,
+// false = not handled.
+// veType - (R) The type of argument to look for and
+// create argument object of a certain type.
+// vnExpectingNOptions - (R) The number of options expected to read
+// following *this argument.
// Return: None.
// Throws: None.
//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd,
- const ArgValType_e veType, const MIuint vnExpectingNOptions)
- : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd, veType, vnExpectingNOptions)
-{
-}
+CMICmdArgValOptionShort::CMICmdArgValOptionShort(
+ const CMIUtilString &vrArgName, const bool vbMandatory,
+ const bool vbHandleByCmd, const ArgValType_e veType,
+ const MIuint vnExpectingNOptions)
+ : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd, veType,
+ vnExpectingNOptions) {}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmdArgValOptionShort destructor.
// Type: Overridden.
// Args: None.
// Return: None.
// Throws: None.
//--
-CMICmdArgValOptionShort::~CMICmdArgValOptionShort()
-{
-}
+CMICmdArgValOptionShort::~CMICmdArgValOptionShort() {}
-//++ ------------------------------------------------------------------------------------
-// Details: Examine the string and determine if it is a valid short type option argument.
+//++
+//------------------------------------------------------------------------------------
+// Details: Examine the string and determine if it is a valid short type option
+// argument.
// Type: Method.
// Args: vrTxt - (R) Some text.
// Return: bool - True = yes valid arg, false = no.
// Throws: None.
//--
-bool
-CMICmdArgValOptionShort::IsArgShortOption(const CMIUtilString &vrTxt) const
-{
- // Look for --someLongOption
- MIint nPos = vrTxt.find("--");
- if (nPos == 0)
- return false;
+bool CMICmdArgValOptionShort::IsArgShortOption(
+ const CMIUtilString &vrTxt) const {
+ // Look for --someLongOption
+ MIint nPos = vrTxt.find("--");
+ if (nPos == 0)
+ return false;
- // Look for -f short option
- nPos = vrTxt.find('-');
- if (nPos != 0)
- return false;
+ // Look for -f short option
+ nPos = vrTxt.find('-');
+ if (nPos != 0)
+ return false;
- if (vrTxt.length() > 2)
- return false;
+ if (vrTxt.length() > 2)
+ return false;
- return true;
+ return true;
}
-//++ ------------------------------------------------------------------------------------
-// Details: Examine the string and determine if it is a valid short type option argument.
+//++
+//------------------------------------------------------------------------------------
+// Details: Examine the string and determine if it is a valid short type option
+// argument.
// Long type argument looks like -f some short option.
// Type: Overridden.
// Args: vrTxt - (R) Some text.
// Return: bool - True = yes valid arg, false = no.
// Throws: None.
//--
-bool
-CMICmdArgValOptionShort::IsArgOptionCorrect(const CMIUtilString &vrTxt) const
-{
- return IsArgShortOption(vrTxt);
+bool CMICmdArgValOptionShort::IsArgOptionCorrect(
+ const CMIUtilString &vrTxt) const {
+ return IsArgShortOption(vrTxt);
}
-//++ ------------------------------------------------------------------------------------
-// Details: Does the argument name of the argument being parsed ATM match the name of
+//++
+//------------------------------------------------------------------------------------
+// Details: Does the argument name of the argument being parsed ATM match the
+// name of
// *this argument object.
// Type: Overridden.
// Args: vrTxt - (R) Some text.
// Return: bool - True = yes arg name matched, false = no.
// Throws: None.
//--
-bool
-CMICmdArgValOptionShort::ArgNameMatch(const CMIUtilString &vrTxt) const
-{
- const CMIUtilString strArg = vrTxt.substr(1);
- return (strArg == GetName());
+bool CMICmdArgValOptionShort::ArgNameMatch(const CMIUtilString &vrTxt) const {
+ const CMIUtilString strArg = vrTxt.substr(1);
+ return (strArg == GetName());
}
OpenPOWER on IntegriCloud