llvm-project/lldb/source/Core
Zachary Turner 691405be38 Refactor the Args class.
There were a number of issues with the Args class preventing
efficient use of strings and incoporating LLVM's StringRef class.
The two biggest were:

1. Backing memory stored in a std::string, so we would frequently
   have to use const_cast to get a mutable buffer for passing to
   various low level APIs.
2. backing std::strings stored in a std::list, which doesn't
   provide random access.

I wanted to solve these two issues so that we could provide
StringRef access to the underlying arguments, and also a way
to provide range-based access to the underlying argument array
while still providing convenient c-style access via an argv style
const char**.

The solution here is to store arguments in a single "entry" class
which contains the backing memory, a StringRef with precomputed
length, and the quote char.  The backing memory is a manually
allocated const char* so that it is not invalidated when the
container is resized, and there is a separate argv array provided
for c-style access.

Differential revision: https://reviews.llvm.org/D25099

llvm-svn: 283157
2016-10-03 22:51:09 +00:00
..
Address.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressRange.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolver.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolverFileLine.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolverName.cpp Make lldb::Regex use StringRef. 2016-09-21 16:01:28 +00:00
ArchSpec.cpp Set the correct triple when creating an ArchSpec for Windows. 2016-09-16 19:09:19 +00:00
Baton.cpp Some more pointer safety in Breakpoint. 2016-09-13 17:53:38 +00:00
Broadcaster.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CMakeLists.txt Use llvm's demangler. 2016-09-07 16:14:00 +00:00
Communication.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Connection.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConnectionMachPort.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConnectionSharedMemory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConstString.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataBufferHeap.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataBufferMemoryMap.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataEncoder.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataExtractor.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Debugger.cpp Update the prompt related functions to use StringRefs. 2016-09-23 18:06:53 +00:00
Disassembler.cpp add stop column highlighting support 2016-09-21 20:13:14 +00:00
DynamicLoader.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
EmulateInstruction.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Error.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Event.cpp Update the prompt related functions to use StringRefs. 2016-09-23 18:06:53 +00:00
FastDemangle.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileLineResolver.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileSpecList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FormatEntity.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
History.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
IOHandler.cpp [lldb-mi] Fix prompt which can get inserted in the middle of program output in lldb-mi 2016-10-01 10:37:56 +00:00
Listener.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Log.cpp Fix about a dozen compile warnings 2016-09-12 05:25:33 +00:00
Logging.cpp Refactor the Args class. 2016-10-03 22:51:09 +00:00
Mangled.cpp Use llvm's demangler. 2016-09-07 16:14:00 +00:00
Module.cpp Change Module::RemapPath to use StringRef. 2016-09-23 18:42:38 +00:00
ModuleChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ModuleList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Opcode.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
PluginManager.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
RegisterValue.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
RegularExpression.cpp Fix failing regex tests. 2016-09-21 17:13:51 +00:00
Scalar.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
SearchFilter.cpp First tests for serializing breakpoints. 2016-09-16 01:41:27 +00:00
Section.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
SourceManager.cpp Fix for loop sign fix in r282112 for column = 0 2016-09-21 22:36:51 +00:00
State.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Stream.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamAsynchronousIO.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamCallback.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamFile.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamGDBRemote.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamString.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StringList.cpp Refactor the Args class. 2016-10-03 22:51:09 +00:00
StructuredData.cpp Fix TestBreakpointSerialization on windows 2016-09-22 15:26:43 +00:00
Timer.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
UUID.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
UserID.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
UserSettingsController.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
VMRange.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Value.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObject.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectCast.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResult.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultCast.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultImpl.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectDynamicValue.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectMemory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectRegister.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectSyntheticFilter.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectVariable.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00