summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Interpreter/Args.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Interpreter/Args.h')
-rw-r--r--lldb/include/lldb/Interpreter/Args.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/include/lldb/Interpreter/Args.h b/lldb/include/lldb/Interpreter/Args.h
index 3dcb4dbdd35..3e56198f74a 100644
--- a/lldb/include/lldb/Interpreter/Args.h
+++ b/lldb/include/lldb/Interpreter/Args.h
@@ -193,6 +193,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
OpenPOWER on IntegriCloud