diff options
Diffstat (limited to 'include/lldb/Interpreter/Args.h')
-rw-r--r-- | include/lldb/Interpreter/Args.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/lldb/Interpreter/Args.h b/include/lldb/Interpreter/Args.h index 6610be14d0dd..bdbf81e02d9d 100644 --- a/include/lldb/Interpreter/Args.h +++ b/include/lldb/Interpreter/Args.h @@ -21,13 +21,14 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" // Project includes -#include "lldb/Core/Error.h" -#include "lldb/Host/OptionParser.h" +#include "lldb/Utility/Error.h" #include "lldb/lldb-private-types.h" #include "lldb/lldb-types.h" namespace lldb_private { +struct Option; + typedef std::vector<std::tuple<std::string, int, std::string>> OptionArgVector; typedef std::shared_ptr<OptionArgVector> OptionArgVectorSP; @@ -193,6 +194,15 @@ public: const char **GetConstArgumentVector() const; //------------------------------------------------------------------ + /// Gets the argument as an ArrayRef. Note that the return value does *not* + /// have a nullptr const char * at the end, as the size of the list is + /// embedded in the ArrayRef object. + //------------------------------------------------------------------ + llvm::ArrayRef<const char *> GetArgumentArrayRef() const { + return llvm::makeArrayRef(m_argv).drop_back(); + } + + //------------------------------------------------------------------ /// Appends a new argument to the end of the list argument list. /// /// @param[in] arg_cstr |