[StringList] Change LongestCommonPrefix API
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 31 Jul 2019 03:26:10 +0000 (03:26 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 31 Jul 2019 03:26:10 +0000 (03:26 +0000)
commit175f0930907c56a80e0500cd201910c36222e788
treedc3e71279bcd2a9f9e6c7d32e21916ecd04783e8
parente825b834ecbd322db137ae8b69b6450282846ee8
[StringList] Change LongestCommonPrefix API

When investigating a completion bug I got confused by the API.
LongestCommonPrefix finds the longest common prefix of the strings in
the string list. Instead of returning that string through an output
argument, just return it by value.

llvm-svn: 367384
lldb/include/lldb/Utility/StringList.h
lldb/source/Core/IOHandler.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Utility/StringList.cpp
lldb/unittests/Utility/StringListTest.cpp