[Lldb-commits] [lldb] r329679 - Move OptionElementVector helper structs from Args to Options

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 10 02:48:05 PDT 2018


Author: labath
Date: Tue Apr 10 02:48:05 2018
New Revision: 329679

URL: http://llvm.org/viewvc/llvm-project?rev=329679&view=rev
Log:
Move OptionElementVector helper structs from Args to Options

These are not used anywhere in the Args class. They should have been
moved as a part of r327110 (Moving Option parsing from Args to Options),
but I did not notice them then.

This does not affect the layering in any way, but in makes sense for the
structs to be defined in the near the code that uses them.

Modified:
    lldb/trunk/include/lldb/Interpreter/Args.h
    lldb/trunk/include/lldb/Interpreter/CommandObject.h
    lldb/trunk/include/lldb/Interpreter/Options.h

Modified: lldb/trunk/include/lldb/Interpreter/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=329679&r1=329678&r2=329679&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Tue Apr 10 02:48:05 2018
@@ -26,22 +26,6 @@
 
 namespace lldb_private {
 
-typedef std::vector<std::tuple<std::string, int, std::string>> OptionArgVector;
-typedef std::shared_ptr<OptionArgVector> OptionArgVectorSP;
-
-struct OptionArgElement {
-  enum { eUnrecognizedArg = -1, eBareDash = -2, eBareDoubleDash = -3 };
-
-  OptionArgElement(int defs_index, int pos, int arg_pos)
-      : opt_defs_index(defs_index), opt_pos(pos), opt_arg_pos(arg_pos) {}
-
-  int opt_defs_index;
-  int opt_pos;
-  int opt_arg_pos;
-};
-
-typedef std::vector<OptionArgElement> OptionElementVector;
-
 //----------------------------------------------------------------------
 /// @class Args Args.h "lldb/Interpreter/Args.h"
 /// @brief A command line argument class.

Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=329679&r1=329678&r2=329679&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Tue Apr 10 02:48:05 2018
@@ -22,6 +22,7 @@
 
 #include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandCompletions.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Utility/StringList.h"
 #include "lldb/lldb-private.h"

Modified: lldb/trunk/include/lldb/Interpreter/Options.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Options.h?rev=329679&r1=329678&r2=329679&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/Options.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Options.h Tue Apr 10 02:48:05 2018
@@ -28,6 +28,22 @@ namespace lldb_private {
 
 struct Option;
 
+typedef std::vector<std::tuple<std::string, int, std::string>> OptionArgVector;
+typedef std::shared_ptr<OptionArgVector> OptionArgVectorSP;
+
+struct OptionArgElement {
+  enum { eUnrecognizedArg = -1, eBareDash = -2, eBareDoubleDash = -3 };
+
+  OptionArgElement(int defs_index, int pos, int arg_pos)
+      : opt_defs_index(defs_index), opt_pos(pos), opt_arg_pos(arg_pos) {}
+
+  int opt_defs_index;
+  int opt_pos;
+  int opt_arg_pos;
+};
+
+typedef std::vector<OptionArgElement> OptionElementVector;
+
 static inline bool isprint8(int ch) {
   if (ch & 0xffffff00u)
     return false;




More information about the lldb-commits mailing list