aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Interpreter/CommandObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Interpreter/CommandObject.h')
-rw-r--r--include/lldb/Interpreter/CommandObject.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/lldb/Interpreter/CommandObject.h b/include/lldb/Interpreter/CommandObject.h
index 7afb18b2f598..f72628b8a643 100644
--- a/include/lldb/Interpreter/CommandObject.h
+++ b/include/lldb/Interpreter/CommandObject.h
@@ -10,14 +10,10 @@
#ifndef liblldb_CommandObject_h_
#define liblldb_CommandObject_h_
-// C Includes
-// C++ Includes
#include <map>
#include <string>
#include <vector>
-// Other libraries and framework includes
-// Project includes
#include "lldb/Utility/Flags.h"
#include "lldb/Interpreter/CommandCompletions.h"
@@ -37,8 +33,9 @@ namespace lldb_private {
// number added.
template <typename ValueType>
-int AddNamesMatchingPartialString(const std::map<std::string, ValueType> &in_map,
- llvm::StringRef cmd_str, StringList &matches) {
+int AddNamesMatchingPartialString(
+ const std::map<std::string, ValueType> &in_map, llvm::StringRef cmd_str,
+ StringList &matches, StringList *descriptions = nullptr) {
int number_added = 0;
const bool add_all = cmd_str.empty();
@@ -47,6 +44,8 @@ int AddNamesMatchingPartialString(const std::map<std::string, ValueType> &in_map
if (add_all || (iter->first.find(cmd_str, 0) == 0)) {
++number_added;
matches.AppendString(iter->first.c_str());
+ if (descriptions)
+ descriptions->AppendString(iter->second->GetHelp());
}
}