[Lldb-commits] [PATCH] D11049: [lldb-mi] size_t rather than MIuint for arg counts.

Bruce Mitchener bruce.mitchener at gmail.com
Wed Jul 8 22:04:17 PDT 2015


brucem created this revision.
brucem added reviewers: abidh, ki.stfu.
brucem added a subscriber: lldb-commits.

[lldb-mi] size_t rather than MIuint for arg counts.

http://reviews.llvm.org/D11049

Files:
  tools/lldb-mi/MICmdArgContext.cpp
  tools/lldb-mi/MICmdArgContext.h
  tools/lldb-mi/MICmdArgSet.cpp
  tools/lldb-mi/MICmdArgSet.h

Index: tools/lldb-mi/MICmdArgSet.h
===================================================================
--- tools/lldb-mi/MICmdArgSet.h
+++ tools/lldb-mi/MICmdArgSet.h
@@ -67,7 +67,7 @@
     bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const;
     const SetCmdArgs_t &GetArgsThatAreMissing(void) const;
     const SetCmdArgs_t &GetArgsThatInvalid(void) const;
-    MIuint GetCount(void) const;
+    size_t GetCount(void) const;
     bool IsArgContextEmpty(void) const;
     bool IsArgsPresentButNotHandledByCmd(void) const;
     void WarningArgsNotHandledbyCmdLogFile(const CMIUtilString &vrCmdName);
Index: tools/lldb-mi/MICmdArgSet.cpp
===================================================================
--- tools/lldb-mi/MICmdArgSet.cpp
+++ tools/lldb-mi/MICmdArgSet.cpp
@@ -335,10 +335,10 @@
 // Details: Retrieve the number of arguments that are being used for the command.
 // Type:    Method.
 // Args:    None.
-// Return:  MIuint - Argument count.
+// Return:  size_t - Argument count.
 // Throws:  None.
 //--
-MIuint
+size_t
 CMICmdArgSet::GetCount(void) const
 {
     return m_setCmdArgs.size();
Index: tools/lldb-mi/MICmdArgContext.h
===================================================================
--- tools/lldb-mi/MICmdArgContext.h
+++ tools/lldb-mi/MICmdArgContext.h
@@ -28,11 +28,11 @@
     /* ctor */ CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw);
     //
     const CMIUtilString &GetArgsLeftToParse(void) const;
-    MIuint GetNumberArgsPresent(void) const;
+    size_t GetNumberArgsPresent(void) const;
     CMIUtilString::VecString_t GetArgs(void) const;
     bool IsEmpty(void) const;
     bool RemoveArg(const CMIUtilString &vArg);
-    bool RemoveArgAtPos(const CMIUtilString &vArg, const MIuint nArgIndex);
+    bool RemoveArgAtPos(const CMIUtilString &vArg, const size_t nArgIndex);
     //
     CMICmdArgContext &operator=(const CMICmdArgContext &vOther);
 
Index: tools/lldb-mi/MICmdArgContext.cpp
===================================================================
--- tools/lldb-mi/MICmdArgContext.cpp
+++ tools/lldb-mi/MICmdArgContext.cpp
@@ -143,15 +143,15 @@
 //          context string.
 // Type:    Method.
 // Args:    vArg        - (R) The name of the argument.
-//          nArgIndex   - (R) The word count position to which to remove the vArg word.
+//          nArgIndex   - The word count position to which to remove the vArg word.
 // Return:  MIstatus::success - Functional succeeded.
 //          MIstatus::failure - Functional failed.
 // Throws:  None.
 //--
 bool
-CMICmdArgContext::RemoveArgAtPos(const CMIUtilString &vArg, const MIuint nArgIndex)
+CMICmdArgContext::RemoveArgAtPos(const CMIUtilString &vArg, size_t nArgIndex)
 {
-    MIuint nWordIndex = 0;
+    size_t nWordIndex = 0;
     CMIUtilString strBuildContextUp;
     const CMIUtilString::VecString_t vecWords(GetArgs());
     const bool bSpaceRequired(GetNumberArgsPresent() > 2);
@@ -202,10 +202,10 @@
 // Details: Retrieve number of arguments or options present in the command's option text.
 // Type:    Method.
 // Args:    None.
-// Return:  MIuint  - 0 to n arguments present.
+// Return:  size_t  - 0 to n arguments present.
 // Throws:  None.
 //--
-MIuint
+size_t
 CMICmdArgContext::GetNumberArgsPresent(void) const
 {
     CMIUtilString::VecString_t vecOptions;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11049.29298.patch
Type: text/x-patch
Size: 3320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150709/10bfabe1/attachment.bin>


More information about the lldb-commits mailing list