summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-03-08 03:48:41 +0000
committerEnrico Granata <egranata@apple.com>2016-03-08 03:48:41 +0000
commit4a795920e3e3fbef8c55956210b698f49d90f091 (patch)
tree462008084d51f3c27f57b7b836f7d3083cbe7b46 /lldb/source
parent5df5402f94376b93d215791330750748053d78e7 (diff)
downloadbcm5719-llvm-4a795920e3e3fbef8c55956210b698f49d90f091.tar.gz
bcm5719-llvm-4a795920e3e3fbef8c55956210b698f49d90f091.zip
Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template function in lldb_private
llvm-svn: 262905
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp2
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp16
2 files changed, 1 insertions, 17 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index 18e162dcec4..887ce24765f 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -181,7 +181,7 @@ CommandObjectMultiword::GenerateHelpText (Stream &output_stream)
output_stream.PutCString ("The following subcommands are supported:\n\n");
CommandMap::iterator pos;
- uint32_t max_len = m_interpreter.FindLongestCommandWord (m_subcommand_dict);
+ uint32_t max_len = FindLongestCommandWord (m_subcommand_dict);
if (max_len)
max_len += 4; // Indent the output by 4 spaces.
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index bf8ac43b105..bfbfabbd469 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1200,22 +1200,6 @@ CommandInterpreter::GetAliasHelp (const char *alias_name, const char *command_na
help_string.Printf ("'");
}
-template <typename ValueType>
-size_t
-CommandInterpreter::FindLongestCommandWord (std::map<std::string,ValueType> &dict)
-{
- auto end = dict.end();
- size_t max_len = 0;
-
- for (auto pos = dict.begin(); pos != end; ++pos)
- {
- size_t len = pos->first.size();
- if (max_len < len)
- max_len = len;
- }
- return max_len;
-}
-
void
CommandInterpreter::GetHelp (CommandReturnObject &result,
uint32_t cmd_types)
OpenPOWER on IntegriCloud