Fixed memory management issues introduced by revision 157507.
authorGreg Clayton <gclayton@apple.com>
Sat, 26 May 2012 17:21:14 +0000 (17:21 +0000)
committerGreg Clayton <gclayton@apple.com>
Sat, 26 May 2012 17:21:14 +0000 (17:21 +0000)
commitd70b14ea9dcbb907a5a58fee415e8e0679a595a1
treec36371ea66ad36cd714e52786c6f648c5b36e804
parent3c05cd3ea8d9073fcf6fab35755c2ef9343c63a6
Fixed memory management issues introduced by revision 157507.

A local std::string was being filled in and then the function would return "s.c_str()".
A local StreamString (which contains a std::string) was being filled in, and essentially also returning the c string from the std::string, though it was in a the StreamString class.

The fix was to not do this by passing a stream object into StringList::Join() and fix the "arch_helper()" function to do what it should: cache the result in a global.

llvm-svn: 157519
lldb/include/lldb/Core/StringList.h
lldb/source/Core/StringList.cpp
lldb/source/Interpreter/CommandObject.cpp