Don't allow direct access to StreamString's internal buffer.
authorZachary Turner <zturner@google.com>
Wed, 16 Nov 2016 21:15:24 +0000 (21:15 +0000)
committerZachary Turner <zturner@google.com>
Wed, 16 Nov 2016 21:15:24 +0000 (21:15 +0000)
commitc156427ded1dfa7686c90cc56ad16013a079a742
treef4912beeebd9e7a04e9c20a8e05d64e25bde192d
parent725dc14bb21da8a01709a6b3370a658d071689dc
Don't allow direct access to StreamString's internal buffer.

This is a large API change that removes the two functions from
StreamString that return a std::string& and a const std::string&,
and instead provide one function which returns a StringRef.

Direct access to the underlying buffer violates the concept of
a "stream" which is intended to provide forward only access,
and makes porting to llvm::raw_ostream more difficult in the
future.

Differential Revision: https://reviews.llvm.org/D26698

llvm-svn: 287152
134 files changed:
lldb/include/lldb/Core/Error.h
lldb/include/lldb/Core/Log.h
lldb/include/lldb/Core/StreamGDBRemote.h
lldb/include/lldb/Core/StreamString.h
lldb/include/lldb/DataFormatters/FormatClasses.h
lldb/include/lldb/Host/Host.h
lldb/include/lldb/Interpreter/CommandReturnObject.h
lldb/include/lldb/Target/Process.h
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/source/API/SBCommandReturnObject.cpp
lldb/source/API/SBFrame.cpp
lldb/source/API/SBStream.cpp
lldb/source/API/SBTarget.cpp
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectHelp.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectMultiword.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectQuit.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectType.cpp
lldb/source/Core/Address.cpp
lldb/source/Core/DataExtractor.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/Disassembler.cpp
lldb/source/Core/EmulateInstruction.cpp
lldb/source/Core/Error.cpp
lldb/source/Core/Event.cpp
lldb/source/Core/FormatEntity.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Core/Log.cpp
lldb/source/Core/Module.cpp
lldb/source/Core/RegisterValue.cpp
lldb/source/Core/StreamString.cpp
lldb/source/Core/StringList.cpp
lldb/source/Core/StructuredData.cpp
lldb/source/Core/ValueObject.cpp
lldb/source/DataFormatters/FormatManager.cpp
lldb/source/DataFormatters/TypeCategory.cpp
lldb/source/DataFormatters/TypeFormat.cpp
lldb/source/DataFormatters/TypeSummary.cpp
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/source/DataFormatters/VectorType.cpp
lldb/source/Expression/IRExecutionUnit.cpp
lldb/source/Expression/LLVMUserExpression.cpp
lldb/source/Expression/Materializer.cpp
lldb/source/Host/macosx/Host.mm
lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
lldb/source/Host/windows/Host.cpp
lldb/source/Interpreter/Args.cpp
lldb/source/Interpreter/CommandAlias.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/source/Interpreter/CommandReturnObject.cpp
lldb/source/Interpreter/OptionValueEnumeration.cpp
lldb/source/Interpreter/OptionValueLanguage.cpp
lldb/source/Interpreter/Options.cpp
lldb/source/Interpreter/Property.cpp
lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
lldb/source/Plugins/Language/Go/GoFormatterFunctions.cpp
lldb/source/Plugins/Language/Java/JavaFormatterFunctions.cpp
lldb/source/Plugins/Language/ObjC/NSArray.cpp
lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
lldb/source/Plugins/Language/ObjC/NSSet.cpp
lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/source/Plugins/Platform/Android/AdbClient.cpp
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
lldb/source/Symbol/ObjectFile.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/StackFrame.cpp
lldb/source/Target/StopInfo.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/TargetList.cpp
lldb/source/Target/Thread.cpp
lldb/source/Target/ThreadPlanCallFunction.cpp
lldb/source/Target/ThreadPlanCallUserExpression.cpp
lldb/source/Target/ThreadPlanStepOverRange.cpp
lldb/tools/argdumper/argdumper.cpp
lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp