Author: malcolm.parsons Date: Wed Nov 2 15:34:10 2016 New Revision: 285855
URL: http://llvm.org/viewvc/llvm-project?rev=285855&view=rev Log: Fix Clang-tidy readability-redundant-string-cstr warnings Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp lldb/trunk/source/Commands/CommandCompletions.cpp lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectFrame.cpp lldb/trunk/source/Commands/CommandObjectPlatform.cpp lldb/trunk/source/Commands/CommandObjectSource.cpp lldb/trunk/source/Commands/CommandObjectTarget.cpp lldb/trunk/source/Core/Broadcaster.cpp lldb/trunk/source/Core/Debugger.cpp lldb/trunk/source/Core/Disassembler.cpp lldb/trunk/source/Core/FormatEntity.cpp lldb/trunk/source/Core/Log.cpp lldb/trunk/source/Core/Module.cpp lldb/trunk/source/Core/Scalar.cpp lldb/trunk/source/Core/SearchFilter.cpp lldb/trunk/source/Core/StructuredData.cpp lldb/trunk/source/Core/ValueObject.cpp lldb/trunk/source/DataFormatters/TypeSummary.cpp lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Expression/REPL.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/common/Host.cpp lldb/trunk/source/Host/common/HostNativeThreadBase.cpp lldb/trunk/source/Host/common/Symbols.cpp lldb/trunk/source/Host/common/ThisThread.cpp lldb/trunk/source/Host/linux/HostInfoLinux.cpp lldb/trunk/source/Host/posix/PipePosix.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Interpreter/OptionValueArray.cpp lldb/trunk/source/Interpreter/OptionValueDictionary.cpp lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/ObjectFile.cpp lldb/trunk/source/Symbol/SymbolContext.cpp lldb/trunk/source/Target/Platform.cpp lldb/trunk/source/Target/ProcessLaunchInfo.cpp lldb/trunk/source/Target/TargetList.cpp lldb/trunk/source/Utility/ModuleCache.cpp lldb/trunk/tools/lldb-server/Acceptor.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp lldb/trunk/unittests/Host/SocketTest.cpp lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp Wed Nov 2 15:34:10 2016 @@ -66,7 +66,7 @@ BreakpointResolver *BreakpointResolverAd error.SetErrorString("BRA::CFSD: Couldn't read module name entry."); return nullptr; } - module_filespec.SetFile(module_name.c_str(), false); + module_filespec.SetFile(module_name, false); } return new BreakpointResolverAddress(bkpt, address, module_filespec); } Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original) +++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Wed Nov 2 15:34:10 2016 @@ -83,7 +83,7 @@ BreakpointResolver *BreakpointResolverFi return nullptr; } - FileSpec file_spec(filename.c_str(), false); + FileSpec file_spec(filename, false); return new BreakpointResolverFileLine(bkpt, file_spec, line_no, offset, check_inlines, skip_prologue, Modified: lldb/trunk/source/Commands/CommandCompletions.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandCompletions.cpp (original) +++ lldb/trunk/source/Commands/CommandCompletions.cpp Wed Nov 2 15:34:10 2016 @@ -414,7 +414,7 @@ CommandCompletions::SourceFileCompleter: match_start_point, max_return_elements, matches), m_include_support_files(include_support_files), m_matching_files() { - FileSpec partial_spec(m_completion_str.c_str(), false); + FileSpec partial_spec(m_completion_str, false); m_file_name = partial_spec.GetFilename().GetCString(); m_dir_name = partial_spec.GetDirectory().GetCString(); } @@ -560,7 +560,7 @@ CommandCompletions::ModuleCompleter::Mod : CommandCompletions::Completer(interpreter, completion_str, match_start_point, max_return_elements, matches) { - FileSpec partial_spec(m_completion_str.c_str(), false); + FileSpec partial_spec(m_completion_str, false); m_file_name = partial_spec.GetFilename().GetCString(); m_dir_name = partial_spec.GetDirectory().GetCString(); } Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Wed Nov 2 15:34:10 2016 @@ -2305,8 +2305,7 @@ protected: } } Error error = target->SerializeBreakpointsToFile( - FileSpec(m_options.m_filename.c_str(), true), valid_bp_ids, - m_options.m_append); + FileSpec(m_options.m_filename, true), valid_bp_ids, m_options.m_append); if (!error.Success()) { result.AppendErrorWithFormat("error serializing breakpoints: %s.", error.AsCString()); Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Wed Nov 2 15:34:10 2016 @@ -635,7 +635,7 @@ protected: } // Verify that the command is alias-able. - if (m_interpreter.CommandExists(alias_command.c_str())) { + if (m_interpreter.CommandExists(alias_command)) { result.AppendErrorWithFormat( "'%s' is a permanent debugger command and cannot be redefined.\n", alias_command.c_str()); @@ -728,7 +728,7 @@ protected: // Verify that the command is alias'able, and get the appropriate command // object. - if (m_interpreter.CommandExists(alias_command.c_str())) { + if (m_interpreter.CommandExists(alias_command)) { result.AppendErrorWithFormat( "'%s' is a permanent debugger command and cannot be redefined.\n", alias_command.c_str()); @@ -780,17 +780,17 @@ protected: args.GetCommandString(args_string); } - if (m_interpreter.AliasExists(alias_command.c_str()) || - m_interpreter.UserCommandExists(alias_command.c_str())) { + if (m_interpreter.AliasExists(alias_command) || + m_interpreter.UserCommandExists(alias_command)) { result.AppendWarningWithFormat( "Overwriting existing definition for '%s'.\n", alias_command.c_str()); } if (CommandAlias *alias = m_interpreter.AddAlias( - alias_command.c_str(), + alias_command, use_subcommand ? subcommand_obj_sp : command_obj_sp, - args_string.c_str())) { + args_string)) { if (m_command_options.m_help.OptionWasSet()) alias->SetHelp(m_command_options.m_help.GetCurrentValue()); if (m_command_options.m_long_help.OptionWasSet()) @@ -1713,7 +1713,7 @@ protected: // everything should be fine now, let's add this alias CommandObjectSP command_obj_sp(new CommandObjectPythonFunction( - m_interpreter, m_cmd_name, funct_name_str.c_str(), m_short_help, + m_interpreter, m_cmd_name, funct_name_str, m_short_help, m_synchronicity)); if (!m_interpreter.AddUserCommand(m_cmd_name, command_obj_sp, Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Wed Nov 2 15:34:10 2016 @@ -591,7 +591,7 @@ protected: scope_string = GetScopeString(var_sp).str(); if (!scope_string.empty()) - s.PutCString(scope_string.c_str()); + s.PutCString(scope_string); if (m_option_variable.show_decl && var_sp->GetDeclaration().GetFile()) { @@ -637,7 +637,7 @@ protected: scope_string = GetScopeString(var_sp).str(); if (!scope_string.empty()) - s.PutCString(scope_string.c_str()); + s.PutCString(scope_string); // if (format != eFormatDefault) // valobj_sp->SetFormat (format); @@ -698,7 +698,7 @@ protected: continue; if (!scope_string.empty()) - s.PutCString(scope_string.c_str()); + s.PutCString(scope_string); if (m_option_variable.show_decl && var_sp->GetDeclaration().GetFile()) { Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Wed Nov 2 15:34:10 2016 @@ -550,7 +550,7 @@ public: perms = lldb::eFilePermissionsUserRW | lldb::eFilePermissionsGroupRW | lldb::eFilePermissionsWorldRead; lldb::user_id_t fd = platform_sp->OpenFile( - FileSpec(cmd_line.c_str(), false), + FileSpec(cmd_line, false), File::eOpenOptionRead | File::eOpenOptionWrite | File::eOpenOptionAppend | File::eOpenOptionCanCreate, perms, error); @@ -957,7 +957,7 @@ public: if (platform_sp) { std::string remote_file_path(args.GetArgumentAtIndex(0)); user_id_t size = - platform_sp->GetFileSize(FileSpec(remote_file_path.c_str(), false)); + platform_sp->GetFileSize(FileSpec(remote_file_path, false)); if (size != UINT64_MAX) { result.AppendMessageWithFormat("File size of %s (remote): %" PRIu64 "\n", @@ -1793,7 +1793,7 @@ public: error = (platform_sp->RunShellCommand(expr, working_dir, &status, &signo, &output, m_options.timeout)); if (!output.empty()) - result.GetOutputStream().PutCString(output.c_str()); + result.GetOutputStream().PutCString(output); if (status > 0) { if (signo > 0) { const char *signo_cstr = Host::GetSignalAsCString(signo); Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectSource.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectSource.cpp Wed Nov 2 15:34:10 2016 @@ -609,7 +609,7 @@ protected: m_module_list.Clear(); if (!m_options.modules.empty()) { for (size_t i = 0, e = m_options.modules.size(); i < e; ++i) { - FileSpec module_file_spec(m_options.modules[i].c_str(), false); + FileSpec module_file_spec(m_options.modules[i], false); if (module_file_spec) { ModuleSpec module_spec(module_file_spec); if (target->GetImages().FindModules(module_spec, m_module_list) == 0) @@ -944,7 +944,7 @@ protected: if (num_modules > 0) { ModuleList matching_modules; for (size_t i = 0; i < num_modules; ++i) { - FileSpec module_file_spec(m_options.modules[i].c_str(), false); + FileSpec module_file_spec(m_options.modules[i], false); if (module_file_spec) { ModuleSpec module_spec(module_file_spec); matching_modules.Clear(); @@ -969,7 +969,7 @@ protected: if (num_modules > 0) { ModuleList matching_modules; for (size_t i = 0; i < num_modules; ++i) { - FileSpec module_file_spec(m_options.modules[i].c_str(), false); + FileSpec module_file_spec(m_options.modules[i], false); if (module_file_spec) { ModuleSpec module_spec(module_file_spec); matching_modules.Clear(); @@ -1228,7 +1228,7 @@ protected: if (!m_options.modules.empty()) { ModuleList matching_modules; for (size_t i = 0, e = m_options.modules.size(); i < e; ++i) { - FileSpec module_file_spec(m_options.modules[i].c_str(), false); + FileSpec module_file_spec(m_options.modules[i], false); if (module_file_spec) { ModuleSpec module_spec(module_file_spec); matching_modules.Clear(); Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original) +++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Nov 2 15:34:10 2016 @@ -1279,7 +1279,7 @@ static void DumpModuleArchitecture(Strea if (width) strm.Printf("%-*s", width, arch_str.c_str()); else - strm.PutCString(arch_str.c_str()); + strm.PutCString(arch_str); } } Modified: lldb/trunk/source/Core/Broadcaster.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Broadcaster.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Broadcaster.cpp (original) +++ lldb/trunk/source/Core/Broadcaster.cpp Wed Nov 2 15:34:10 2016 @@ -99,7 +99,7 @@ bool Broadcaster::BroadcasterImpl::GetEv s.PutCString(GetBroadcasterName()); s.PutChar('.'); } - s.PutCString(pos->second.c_str()); + s.PutCString(pos->second); ++num_names_added; } } Modified: lldb/trunk/source/Core/Debugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Debugger.cpp (original) +++ lldb/trunk/source/Core/Debugger.cpp Wed Nov 2 15:34:10 2016 @@ -280,7 +280,7 @@ Error Debugger::SetPropertyValue(const E std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes( new_prompt, GetUseColor()); if (str.length()) - new_prompt = str.c_str(); + new_prompt = str; GetCommandInterpreter().UpdatePrompt(new_prompt); EventSP prompt_change_event_sp( new Event(CommandInterpreter::eBroadcastBitResetPrompt, @@ -350,7 +350,7 @@ void Debugger::SetPrompt(llvm::StringRef std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor()); if (str.length()) - new_prompt = str.c_str(); + new_prompt = str; GetCommandInterpreter().UpdatePrompt(new_prompt); } @@ -1429,7 +1429,7 @@ void Debugger::HandleProcessEvent(const content_stream.Flush(); // Print it. - output_stream_sp->PutCString(content_stream.GetString().c_str()); + output_stream_sp->PutCString(content_stream.GetString()); } } else { error_stream_sp->Printf("Failed to print structured " Modified: lldb/trunk/source/Core/Disassembler.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Disassembler.cpp (original) +++ lldb/trunk/source/Core/Disassembler.cpp Wed Nov 2 15:34:10 2016 @@ -725,15 +725,15 @@ void Instruction::Dump(lldb_private::Str opcode_column_width = m_opcode_name.length() + 1; } - ss.PutCString(m_opcode_name.c_str()); + ss.PutCString(m_opcode_name); ss.FillLastLineToColumn(opcode_pos + opcode_column_width, ' '); - ss.PutCString(m_mnemonics.c_str()); + ss.PutCString(m_mnemonics); if (!m_comment.empty()) { ss.FillLastLineToColumn( opcode_pos + opcode_column_width + operand_column_width, ' '); ss.PutCString(" ; "); - ss.PutCString(m_comment.c_str()); + ss.PutCString(m_comment); } s->Write(ss.GetData(), ss.GetSize()); } Modified: lldb/trunk/source/Core/FormatEntity.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/FormatEntity.cpp (original) +++ lldb/trunk/source/Core/FormatEntity.cpp Wed Nov 2 15:34:10 2016 @@ -1106,7 +1106,7 @@ bool FormatEntity::Format(const Entry &e return true; // Only return true if all items succeeded case Entry::Type::String: - s.PutCString(entry.string.c_str()); + s.PutCString(entry.string); return true; case Entry::Type::Scope: { Modified: lldb/trunk/source/Core/Log.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Log.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Log.cpp (original) +++ lldb/trunk/source/Core/Log.cpp Wed Nov 2 15:34:10 2016 @@ -107,16 +107,16 @@ void Log::VAPrintf(const char *format, v llvm::raw_string_ostream stream(back_trace); llvm::sys::PrintStackTrace(stream); stream.flush(); - header.PutCString(back_trace.c_str()); + header.PutCString(back_trace); } if (m_options.Test(LLDB_LOG_OPTION_THREADSAFE)) { static std::recursive_mutex g_LogThreadedMutex; std::lock_guard<std::recursive_mutex> guard(g_LogThreadedMutex); - stream_sp->PutCString(header.GetString().c_str()); + stream_sp->PutCString(header.GetString()); stream_sp->Flush(); } else { - stream_sp->PutCString(header.GetString().c_str()); + stream_sp->PutCString(header.GetString()); stream_sp->Flush(); } } Modified: lldb/trunk/source/Core/Module.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Module.cpp (original) +++ lldb/trunk/source/Core/Module.cpp Wed Nov 2 15:34:10 2016 @@ -1208,7 +1208,7 @@ void Module::LogMessageVerboseBacktrace( std::string back_trace; llvm::raw_string_ostream stream(back_trace); llvm::sys::PrintStackTrace(stream); - log_message.PutCString(back_trace.c_str()); + log_message.PutCString(back_trace); } log->PutCString(log_message.GetString().c_str()); } Modified: lldb/trunk/source/Core/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/Scalar.cpp (original) +++ lldb/trunk/source/Core/Scalar.cpp Wed Nov 2 15:34:10 2016 @@ -289,14 +289,14 @@ void Scalar::GetValue(Stream *s, bool sh case e_slonglong: case e_sint128: case e_sint256: - s->PutCString(m_integer.toString(10, true).c_str()); + s->PutCString(m_integer.toString(10, true)); break; case e_uint: case e_ulong: case e_ulonglong: case e_uint128: case e_uint256: - s->PutCString(m_integer.toString(10, false).c_str()); + s->PutCString(m_integer.toString(10, false)); break; case e_float: case e_double: Modified: lldb/trunk/source/Core/SearchFilter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/SearchFilter.cpp (original) +++ lldb/trunk/source/Core/SearchFilter.cpp Wed Nov 2 15:34:10 2016 @@ -477,7 +477,7 @@ SearchFilterSP SearchFilterByModule::Cre error.SetErrorString("SFBM::CFSD: filter module item not a string."); return nullptr; } - FileSpec module_spec(module.c_str(), false); + FileSpec module_spec(module, false); return SearchFilterSP( new SearchFilterByModule(target.shared_from_this(), module_spec)); @@ -646,7 +646,7 @@ SearchFilterSP SearchFilterByModuleList: "SFBM::CFSD: filter module item %zu not a string.", i); return nullptr; } - modules.Append(FileSpec(module.c_str(), false)); + modules.Append(FileSpec(module, false)); } } @@ -711,7 +711,7 @@ lldb::SearchFilterSP SearchFilterByModul "SFBM::CFSD: filter module item %zu not a string.", i); return result_sp; } - modules.Append(FileSpec(module.c_str(), false)); + modules.Append(FileSpec(module, false)); } } @@ -733,7 +733,7 @@ lldb::SearchFilterSP SearchFilterByModul "SFBM::CFSD: filter cu item %zu not a string.", i); return nullptr; } - cus.Append(FileSpec(cu.c_str(), false)); + cus.Append(FileSpec(cu, false)); } return SearchFilterSP(new SearchFilterByModuleListAndCU( Modified: lldb/trunk/source/Core/StructuredData.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/StructuredData.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/StructuredData.cpp (original) +++ lldb/trunk/source/Core/StructuredData.cpp Wed Nov 2 15:34:10 2016 @@ -181,7 +181,7 @@ StructuredData::Object::GetObjectForDotS if (this->GetType() == Type::eTypeDictionary) { std::pair<llvm::StringRef, llvm::StringRef> match = path.split('.'); std::string key = match.first.str(); - ObjectSP value = this->GetAsDictionary()->GetValueForKey(key.c_str()); + ObjectSP value = this->GetAsDictionary()->GetValueForKey(key); if (value.get()) { // Do we have additional words to descend? If not, return the // value we're at right now. Modified: lldb/trunk/source/Core/ValueObject.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Core/ValueObject.cpp (original) +++ lldb/trunk/source/Core/ValueObject.cpp Wed Nov 2 15:34:10 2016 @@ -2034,7 +2034,7 @@ bool ValueObject::GetBaseClassPath(Strea if (this_had_base_class) { if (parent_had_base_class) s.PutCString("::"); - s.PutCString(cxx_class_name.c_str()); + s.PutCString(cxx_class_name); } return parent_had_base_class || this_had_base_class; } Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original) +++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Wed Nov 2 15:34:10 2016 @@ -207,10 +207,10 @@ std::string ScriptSummaryFormat::GetDesc if (m_function_name.empty()) { sstr.PutCString("no backing script"); } else { - sstr.PutCString(m_function_name.c_str()); + sstr.PutCString(m_function_name); } } else { - sstr.PutCString(m_python_script.c_str()); + sstr.PutCString(m_python_script); } return sstr.GetString(); } Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original) +++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Wed Nov 2 15:34:10 2016 @@ -562,7 +562,7 @@ IRDynamicChecks::~IRDynamicChecks() = de bool IRDynamicChecks::runOnModule(llvm::Module &M) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); - llvm::Function *function = M.getFunction(StringRef(m_func_name.c_str())); + llvm::Function *function = M.getFunction(StringRef(m_func_name)); if (!function) { if (log) Modified: lldb/trunk/source/Expression/REPL.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Expression/REPL.cpp (original) +++ lldb/trunk/source/Expression/REPL.cpp Wed Nov 2 15:34:10 2016 @@ -433,7 +433,7 @@ void REPL::IOHandlerInputComplete(IOHand // Now set the default file and line to the REPL source file m_target.GetSourceManager().SetDefaultFileAndLine( - FileSpec(m_repl_source_path.c_str(), false), new_default_line); + FileSpec(m_repl_source_path, false), new_default_line); } static_cast<IOHandlerEditline &>(io_handler) .SetBaseLineNumber(m_code.GetSize() + 1); Modified: lldb/trunk/source/Host/common/FileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/common/FileSpec.cpp (original) +++ lldb/trunk/source/Host/common/FileSpec.cpp Wed Nov 2 15:34:10 2016 @@ -610,7 +610,7 @@ FileSpec FileSpec::GetNormalizedPath() c void FileSpec::Dump(Stream *s) const { if (s) { std::string path{GetPath(true)}; - s->PutCString(path.c_str()); + s->PutCString(path); char path_separator = GetPreferredPathSeparator(m_syntax); if (!m_filename && !path.empty() && path.back() != path_separator) s->PutChar(path_separator); Modified: lldb/trunk/source/Host/common/Host.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/common/Host.cpp (original) +++ lldb/trunk/source/Host/common/Host.cpp Wed Nov 2 15:34:10 2016 @@ -539,7 +539,7 @@ Error Host::RunShellCommand(const Args & FileSpec tmpdir_file_spec; if (HostInfo::GetLLDBPath(ePathTypeLLDBTempSystemDir, tmpdir_file_spec)) { tmpdir_file_spec.AppendPathComponent("lldb-shell-output.%%%%%%"); - llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath().c_str(), + llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath(), output_file_path); } else { llvm::sys::fs::createTemporaryFile("lldb-shell-output.%%%%%%", "", Modified: lldb/trunk/source/Host/common/HostNativeThreadBase.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostNativeThreadBase.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/common/HostNativeThreadBase.cpp (original) +++ lldb/trunk/source/Host/common/HostNativeThreadBase.cpp Wed Nov 2 15:34:10 2016 @@ -52,8 +52,7 @@ lldb::thread_result_t HostNativeThreadBase::ThreadCreateTrampoline(lldb::thread_arg_t arg) { ThreadLauncher::HostThreadCreateInfo *info = (ThreadLauncher::HostThreadCreateInfo *)arg; - ThisThread::SetName(info->thread_name.c_str(), - HostInfo::GetMaxThreadNameLength()); + ThisThread::SetName(info->thread_name, HostInfo::GetMaxThreadNameLength()); thread_func_t thread_fptr = info->thread_fptr; thread_arg_t thread_arg = info->thread_arg; Modified: lldb/trunk/source/Host/common/Symbols.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/common/Symbols.cpp (original) +++ lldb/trunk/source/Host/common/Symbols.cpp Wed Nov 2 15:34:10 2016 @@ -246,7 +246,7 @@ FileSpec Symbols::LocateExecutableSymbol const uint32_t num_files = files.size(); for (size_t idx_file = 0; idx_file < num_files; ++idx_file) { const std::string &filename = files[idx_file]; - FileSpec file_spec(filename.c_str(), true); + FileSpec file_spec(filename, true); if (llvm::sys::fs::equivalent(file_spec.GetPath(), module_spec.GetFileSpec().GetPath())) Modified: lldb/trunk/source/Host/common/ThisThread.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/ThisThread.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/common/ThisThread.cpp (original) +++ lldb/trunk/source/Host/common/ThisThread.cpp Wed Nov 2 15:34:10 2016 @@ -46,5 +46,5 @@ void ThisThread::SetName(llvm::StringRef truncated_name = truncated_name.substr(begin, count); } - SetName(truncated_name.c_str()); + SetName(truncated_name); } Modified: lldb/trunk/source/Host/linux/HostInfoLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/HostInfoLinux.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/linux/HostInfoLinux.cpp (original) +++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp Wed Nov 2 15:34:10 2016 @@ -176,7 +176,7 @@ llvm::StringRef HostInfoLinux::GetDistri } }); - return g_fields->m_distribution_id.c_str(); + return g_fields->m_distribution_id; } FileSpec HostInfoLinux::GetProgramFileSpec() { Modified: lldb/trunk/source/Host/posix/PipePosix.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/PipePosix.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Host/posix/PipePosix.cpp (original) +++ lldb/trunk/source/Host/posix/PipePosix.cpp Wed Nov 2 15:34:10 2016 @@ -142,7 +142,7 @@ Error PipePosix::CreateWithUniqueName(ll // should try again. Error error; do { - llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath().c_str(), + llvm::sys::fs::createUniqueFile(tmpdir_file_spec.GetPath(), named_pipe_path); error = CreateNew(named_pipe_path, child_process_inherit); } while (error.GetError() == EEXIST); Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Wed Nov 2 15:34:10 2016 @@ -1656,7 +1656,7 @@ bool CommandInterpreter::HandleCommand(c if (repeat_command != nullptr) m_repeat_command.assign(repeat_command); else - m_repeat_command.assign(original_command_string.c_str()); + m_repeat_command.assign(original_command_string); m_command_history.AppendString(original_command_string); } @@ -2146,7 +2146,7 @@ void CommandInterpreter::SourceInitFile( } if (!init_file && !m_skip_lldbinit_files) - init_file.SetFile(init_file_path.c_str(), false); + init_file.SetFile(init_file_path, false); } // If the file exists, tell HandleCommand to 'source' it; this will do the @@ -2932,7 +2932,7 @@ CommandInterpreter::ResolveCommandImpl(s ExtractCommand(scratch_command, next_word, suffix, quote_char); if (cmd_obj == nullptr) { std::string full_name; - bool is_alias = GetAliasFullName(next_word.c_str(), full_name); + bool is_alias = GetAliasFullName(next_word, full_name); cmd_obj = GetCommandObject(next_word, &matches); bool is_real_command = (is_alias == false) || @@ -2940,8 +2940,8 @@ CommandInterpreter::ResolveCommandImpl(s if (!is_real_command) { matches.Clear(); std::string alias_result; - cmd_obj = BuildAliasResult(full_name.c_str(), scratch_command, - alias_result, result); + cmd_obj = + BuildAliasResult(full_name, scratch_command, alias_result, result); revised_command_line.Printf("%s", alias_result.c_str()); if (cmd_obj) { wants_raw_input = cmd_obj->WantsRawCommandString(); Modified: lldb/trunk/source/Interpreter/OptionValueArray.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueArray.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/OptionValueArray.cpp (original) +++ lldb/trunk/source/Interpreter/OptionValueArray.cpp Wed Nov 2 15:34:10 2016 @@ -72,7 +72,7 @@ void OptionValueArray::DumpValue(const E Error OptionValueArray::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { - Args args(value.str().c_str()); + Args args(value.str()); Error error = SetArgs(args, op); if (error.Success()) NotifyValueChanged(); Modified: lldb/trunk/source/Interpreter/OptionValueDictionary.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueDictionary.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/OptionValueDictionary.cpp (original) +++ lldb/trunk/source/Interpreter/OptionValueDictionary.cpp Wed Nov 2 15:34:10 2016 @@ -198,7 +198,7 @@ Error OptionValueDictionary::SetArgs(con Error OptionValueDictionary::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { - Args args(value.str().c_str()); + Args args(value.str()); Error error = SetArgs(args, op); if (error.Success()) NotifyValueChanged(); Modified: lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp (original) +++ lldb/trunk/source/Interpreter/OptionValueFileSpec.cpp Wed Nov 2 15:34:10 2016 @@ -77,7 +77,7 @@ Error OptionValueFileSpec::SetValueFromS // or whitespace. value = value.trim("\"' \t"); m_value_was_set = true; - m_current_value.SetFile(value.str().c_str(), m_resolve); + m_current_value.SetFile(value.str(), m_resolve); m_data_sp.reset(); m_data_mod_time.Clear(); NotifyValueChanged(); Modified: lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp (original) +++ lldb/trunk/source/Interpreter/OptionValueFileSpecLIst.cpp Wed Nov 2 15:34:10 2016 @@ -41,7 +41,7 @@ void OptionValueFileSpecList::DumpValue( Error OptionValueFileSpecList::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { Error error; - Args args(value.str().c_str()); + Args args(value.str()); const size_t argc = args.GetArgumentCount(); switch (op) { Modified: lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp (original) +++ lldb/trunk/source/Interpreter/OptionValuePathMappings.cpp Wed Nov 2 15:34:10 2016 @@ -43,7 +43,7 @@ void OptionValuePathMappings::DumpValue( Error OptionValuePathMappings::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { Error error; - Args args(value.str().c_str()); + Args args(value.str()); const size_t argc = args.GetArgumentCount(); switch (op) { Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Wed Nov 2 15:34:10 2016 @@ -736,7 +736,7 @@ public: if (op.m_negative) { s.PutCString("-"); } - s.PutCString(llvm::to_string(op.m_immediate).c_str()); + s.PutCString(llvm::to_string(op.m_immediate)); break; case Operand::Type::Invalid: s.PutCString("Invalid"); @@ -1044,8 +1044,7 @@ DisassemblerLLVMC::DisassemblerLLVMC(con } else { thumb_arch_name = "thumbv8.2a"; } - thumb_arch.GetTriple().setArchName( - llvm::StringRef(thumb_arch_name.c_str())); + thumb_arch.GetTriple().setArchName(llvm::StringRef(thumb_arch_name)); } // If no sub architecture specified then use the most recent arm architecture Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp Wed Nov 2 15:34:10 2016 @@ -369,7 +369,7 @@ void DynamicLoaderHexagonDYLD::RefreshMo E = m_rendezvous.loaded_end(); for (I = m_rendezvous.loaded_begin(); I != E; ++I) { - FileSpec file(I->path.c_str(), true); + FileSpec file(I->path, true); ModuleSP module_sp = LoadModuleAtAddress(file, I->link_addr, I->base_addr, true); if (module_sp.get()) { @@ -393,7 +393,7 @@ void DynamicLoaderHexagonDYLD::RefreshMo E = m_rendezvous.unloaded_end(); for (I = m_rendezvous.unloaded_begin(); I != E; ++I) { - FileSpec file(I->path.c_str(), true); + FileSpec file(I->path, true); ModuleSpec module_spec(file); ModuleSP module_sp = loaded_modules.FindFirstModule(module_spec); Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp Wed Nov 2 15:34:10 2016 @@ -378,8 +378,7 @@ bool DynamicLoaderDarwin::JSONImageInfor image_infos[i].mod_date = image->GetValueForKey("mod_date")->GetAsInteger()->GetValue(); image_infos[i].file_spec.SetFile( - image->GetValueForKey("pathname")->GetAsString()->GetValue().c_str(), - false); + image->GetValueForKey("pathname")->GetAsString()->GetValue(), false); StructuredData::Dictionary *mh = image->GetValueForKey("mach_header")->GetAsDictionary(); Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp Wed Nov 2 15:34:10 2016 @@ -472,9 +472,8 @@ bool DynamicLoaderMacOS::GetSharedCacheI info_dict->HasKey("shared_cache_base_address")) { base_address = info_dict->GetValueForKey("shared_cache_base_address") ->GetIntegerValue(LLDB_INVALID_ADDRESS); - std::string uuid_str = info_dict->GetValueForKey("shared_cache_uuid") - ->GetStringValue() - .c_str(); + std::string uuid_str = + info_dict->GetValueForKey("shared_cache_uuid")->GetStringValue(); if (!uuid_str.empty()) uuid.SetFromCString(uuid_str.c_str()); if (info_dict->GetValueForKey("no_shared_cache")->GetBooleanValue() == Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp Wed Nov 2 15:34:10 2016 @@ -106,6 +106,4 @@ void ASTDumper::ToLog(Log *log, const ch free(alloc); } -void ASTDumper::ToStream(lldb::StreamSP &stream) { - stream->PutCString(m_dump.c_str()); -} +void ASTDumper::ToStream(lldb::StreamSP &stream) { stream->PutCString(m_dump); } Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp Wed Nov 2 15:34:10 2016 @@ -60,7 +60,7 @@ void ASTStructExtractor::ExtractFromFunc RecordDecl *struct_decl = NULL; - StringRef desired_name(m_struct_name.c_str()); + StringRef desired_name(m_struct_name); for (CompoundStmt::const_body_iterator bi = body_compound_stmt->body_begin(), be = body_compound_stmt->body_end(); @@ -125,7 +125,7 @@ void ASTStructExtractor::ExtractFromTopL if (m_ast_context && function_decl && !m_function.m_wrapper_function_name.compare( - function_decl->getNameAsString().c_str())) { + function_decl->getNameAsString())) { ExtractFromFunctionDecl(function_decl); } } Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Wed Nov 2 15:34:10 2016 @@ -922,7 +922,7 @@ static bool FindObjCMethodDeclsWithOrigi std::string decl_name_string_without_colon(decl_name_string.c_str(), decl_name_string.length() - 1); IdentifierInfo *ident = - &original_ctx->Idents.get(decl_name_string_without_colon.c_str()); + &original_ctx->Idents.get(decl_name_string_without_colon); original_selector = original_ctx->Selectors.getSelector(1, &ident); } else { SmallVector<IdentifierInfo *, 4> idents; @@ -1293,7 +1293,7 @@ static bool FindObjCPropertyAndIvarDecls return false; std::string name_str = context.m_decl_name.getAsString(); - StringRef name(name_str.c_str()); + StringRef name(name_str); IdentifierInfo &name_identifier( origin_iface_decl->getASTContext().Idents.get(name)); Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Wed Nov 2 15:34:10 2016 @@ -131,7 +131,7 @@ void StoringDiagnosticConsumer::DumpDiag for (IDAndDiagnostic &diag : m_diagnostics) { switch (diag.first) { default: - error_stream.PutCString(diag.second.c_str()); + error_stream.PutCString(diag.second); error_stream.PutChar('\n'); break; case clang::DiagnosticsEngine::Level::Ignored: @@ -441,7 +441,7 @@ void ClangModulesDeclVendorImpl::ForEach if (macro_info) { std::string macro_expansion = "#define "; - macro_expansion.append(mi->first->getName().str().c_str()); + macro_expansion.append(mi->first->getName().str()); { if (macro_info->isFunctionLike()) { Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Wed Nov 2 15:34:10 2016 @@ -1149,7 +1149,7 @@ bool IRForTarget::RewritePersistentAlloc GlobalVariable *persistent_global = new GlobalVariable( (*m_module), alloc->getType(), false, /* not constant */ GlobalValue::ExternalLinkage, NULL, /* no initializer */ - alloc->getName().str().c_str()); + alloc->getName().str()); // What we're going to do here is make believe this was a regular old external // variable. That means we need to make the metadata valid. Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp (original) +++ lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp Wed Nov 2 15:34:10 2016 @@ -244,7 +244,7 @@ bool AddressSanitizerRuntime::NotifyBrea if (thread_sp) thread_sp->SetStopInfo(InstrumentationRuntimeStopInfo:: CreateStopReasonWithInstrumentationData( - *thread_sp, description.c_str(), report)); + *thread_sp, description, report)); StreamFileSP stream_sp( process_sp->GetTarget().GetDebugger().GetOutputFile()); Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp (original) +++ lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Wed Nov 2 15:34:10 2016 @@ -817,7 +817,7 @@ bool ThreadSanitizerRuntime::NotifyBreak thread_sp->SetStopInfo( InstrumentationRuntimeStopInfo:: CreateStopReasonWithInstrumentationData( - *thread_sp, stop_reason_description.c_str(), report)); + *thread_sp, stop_reason_description, report)); StreamFileSP stream_sp( process_sp->GetTarget().GetDebugger().GetOutputFile()); Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original) +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Nov 2 15:34:10 2016 @@ -972,7 +972,7 @@ lldb_private::FileSpecList ObjectFileELF FileSpecList file_spec_list; if (!m_gnu_debuglink_file.empty()) { - FileSpec file_spec(m_gnu_debuglink_file.c_str(), false); + FileSpec file_spec(m_gnu_debuglink_file, false); file_spec_list.Append(file_spec); } return file_spec_list; Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Wed Nov 2 15:34:10 2016 @@ -428,7 +428,7 @@ AdbClient::GetSyncService(Error &error) Error AdbClient::SyncService::internalPullFile(const FileSpec &remote_file, const FileSpec &local_file) { const auto local_file_path = local_file.GetPath(); - llvm::FileRemover local_file_remover(local_file_path.c_str()); + llvm::FileRemover local_file_remover(local_file_path); std::ofstream dst(local_file_path, std::ios::out | std::ios::binary); if (!dst.is_open()) Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Wed Nov 2 15:34:10 2016 @@ -345,7 +345,7 @@ Error PlatformAndroid::DownloadSymbolFil log->Printf("Failed to remove temp directory: %s", error.AsCString()); }); - FileSpec symfile_platform_filespec(tmpdir.c_str(), false); + FileSpec symfile_platform_filespec(tmpdir, false); symfile_platform_filespec.AppendPathComponent("symbolized.oat"); // Execute oatdump on the remote device to generate a file with symtab Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Wed Nov 2 15:34:10 2016 @@ -373,7 +373,7 @@ lldb_private::Error PlatformDarwin::GetS if (!cache_path.empty()) { std::string module_path(module_spec.GetFileSpec().GetPath()); cache_path.append(module_path); - FileSpec module_cache_spec(cache_path.c_str(), false); + FileSpec module_cache_spec(cache_path, false); // if rsync is supported, always bring in the file - rsync will be very // efficient @@ -1294,7 +1294,7 @@ const char *PlatformDarwin::GetDeveloper if (xcode_select_prefix_dir) xcode_dir_path.append(xcode_select_prefix_dir); xcode_dir_path.append("/usr/share/xcode-select/xcode_dir_path"); - temp_file_spec.SetFile(xcode_dir_path.c_str(), false); + temp_file_spec.SetFile(xcode_dir_path, false); size_t bytes_read = temp_file_spec.ReadFileContents( 0, developer_dir_path, sizeof(developer_dir_path), NULL); if (bytes_read > 0) { @@ -1436,7 +1436,7 @@ static FileSpec CheckPathForXcode(const size_t pos = path_to_shlib.rfind(substr); if (pos != std::string::npos) { path_to_shlib.erase(pos + strlen(substr)); - FileSpec ret(path_to_shlib.c_str(), false); + FileSpec ret(path_to_shlib, false); FileSpec xcode_binary_path = ret; xcode_binary_path.AppendPathComponent("MacOS"); @@ -1503,7 +1503,7 @@ static FileSpec GetXcodeContentsPath() { } output.append("/.."); - g_xcode_filespec = CheckPathForXcode(FileSpec(output.c_str(), false)); + g_xcode_filespec = CheckPathForXcode(FileSpec(output, false)); } } } @@ -1604,7 +1604,7 @@ FileSpec PlatformDarwin::FindSDKInXcodeF enumerator_info.sdk_type = sdk_type; - FileSpec::EnumerateDirectory(sdks_spec.GetPath().c_str(), find_directories, + FileSpec::EnumerateDirectory(sdks_spec.GetPath(), find_directories, find_files, find_other, DirectoryEnumerator, &enumerator_info); @@ -1654,8 +1654,7 @@ FileSpec PlatformDarwin::GetSDKDirectory FileSpec native_sdk_spec = sdks_spec; StreamString native_sdk_name; native_sdk_name.Printf("MacOSX%u.%u.sdk", major, minor); - native_sdk_spec.AppendPathComponent( - native_sdk_name.GetString().c_str()); + native_sdk_spec.AppendPathComponent(native_sdk_name.GetString()); if (native_sdk_spec.Exists()) { return native_sdk_spec; @@ -1744,22 +1743,19 @@ void PlatformDarwin::AddClangModuleCompi minimum_version_option.PutCString("-mios-version-min="); minimum_version_option.PutCString( clang::VersionTuple(versions[0], versions[1], versions[2]) - .getAsString() - .c_str()); + .getAsString()); break; case SDKType::iPhoneSimulator: minimum_version_option.PutCString("-mios-simulator-version-min="); minimum_version_option.PutCString( clang::VersionTuple(versions[0], versions[1], versions[2]) - .getAsString() - .c_str()); + .getAsString()); break; case SDKType::MacOSX: minimum_version_option.PutCString("-mmacosx-version-min="); minimum_version_option.PutCString( clang::VersionTuple(versions[0], versions[1], versions[2]) - .getAsString() - .c_str()); + .getAsString()); } options.push_back(minimum_version_option.GetString()); } Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Wed Nov 2 15:34:10 2016 @@ -220,13 +220,13 @@ ConstString PlatformMacOSX::GetSDKDirect "SDKs/MacOSX%u.%u.sdk", xcode_contents_path.c_str(), versions[0], versions[1]); - fspec.SetFile(sdk_path.GetString().c_str(), false); + fspec.SetFile(sdk_path.GetString(), false); if (fspec.Exists()) return ConstString(sdk_path.GetString().c_str()); } if (!default_xcode_sdk.empty()) { - fspec.SetFile(default_xcode_sdk.c_str(), false); + fspec.SetFile(default_xcode_sdk, false); if (fspec.Exists()) return ConstString(default_xcode_sdk.c_str()); } @@ -270,7 +270,7 @@ PlatformMacOSX::GetFileWithUUID(const ll std::string cache_path(GetLocalCacheDirectory()); std::string module_path(platform_file.GetPath()); cache_path.append(module_path); - FileSpec module_cache_spec(cache_path.c_str(), false); + FileSpec module_cache_spec(cache_path, false); if (module_cache_spec.Exists()) { local_file = module_cache_spec; return Error(); Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp Wed Nov 2 15:34:10 2016 @@ -271,8 +271,8 @@ bool PlatformRemoteAppleTV::UpdateSDKDir const bool find_other = false; SDKDirectoryInfoCollection builtin_sdk_directory_infos; - FileSpec::EnumerateDirectory(m_device_support_directory.c_str(), - find_directories, find_files, find_other, + FileSpec::EnumerateDirectory(m_device_support_directory, find_directories, + find_files, find_other, GetContainedFilesIntoVectorOfStringsCallback, &builtin_sdk_directory_infos); @@ -530,7 +530,7 @@ bool PlatformRemoteAppleTV::GetFileInSDK const char *paths_to_try[] = {"Symbols", "", "Symbols.Internal", nullptr}; for (size_t i = 0; paths_to_try[i] != nullptr; i++) { - local_file.SetFile(sdkroot_path.c_str(), false); + local_file.SetFile(sdkroot_path, false); if (paths_to_try[i][0] != '\0') local_file.AppendPathComponent(paths_to_try[i]); local_file.AppendPathComponent(platform_file_path); Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp Wed Nov 2 15:34:10 2016 @@ -281,8 +281,8 @@ bool PlatformRemoteAppleWatch::UpdateSDK const bool find_other = false; SDKDirectoryInfoCollection builtin_sdk_directory_infos; - FileSpec::EnumerateDirectory(m_device_support_directory.c_str(), - find_directories, find_files, find_other, + FileSpec::EnumerateDirectory(m_device_support_directory, find_directories, + find_files, find_other, GetContainedFilesIntoVectorOfStringsCallback, &builtin_sdk_directory_infos); @@ -452,14 +452,13 @@ const char *PlatformRemoteAppleWatch::Ge m_device_support_directory.assign(device_support_dir); m_device_support_directory.append( "/Platforms/watchOS.platform/DeviceSupport"); - FileSpec platform_device_support_dir(m_device_support_directory.c_str(), - true); + FileSpec platform_device_support_dir(m_device_support_directory, true); if (!platform_device_support_dir.Exists()) { std::string alt_platform_dirname = device_support_dir; alt_platform_dirname.append( "/Platforms/WatchOS.platform/DeviceSupport"); - FileSpec alt_platform_device_support_dir( - m_device_support_directory.c_str(), true); + FileSpec alt_platform_device_support_dir(m_device_support_directory, + true); if (alt_platform_device_support_dir.Exists()) { m_device_support_directory = alt_platform_dirname; } @@ -545,7 +544,7 @@ bool PlatformRemoteAppleWatch::GetFileIn const char *paths_to_try[] = {"Symbols", "", "Symbols.Internal", nullptr}; for (size_t i = 0; paths_to_try[i] != nullptr; i++) { - local_file.SetFile(sdkroot_path.c_str(), false); + local_file.SetFile(sdkroot_path, false); if (paths_to_try[i][0] != '\0') local_file.AppendPathComponent(paths_to_try[i]); local_file.AppendPathComponent(platform_file_path); Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original) +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Wed Nov 2 15:34:10 2016 @@ -288,8 +288,8 @@ bool PlatformRemoteiOS::UpdateSDKDirecto const bool find_other = false; SDKDirectoryInfoCollection builtin_sdk_directory_infos; - FileSpec::EnumerateDirectory(m_device_support_directory.c_str(), - find_directories, find_files, find_other, + FileSpec::EnumerateDirectory(m_device_support_directory, find_directories, + find_files, find_other, GetContainedFilesIntoVectorOfStringsCallback, &builtin_sdk_directory_infos); @@ -516,7 +516,7 @@ bool PlatformRemoteiOS::GetFileInSDK(con const char *paths_to_try[] = {"Symbols", "", "Symbols.Internal", nullptr}; for (size_t i = 0; paths_to_try[i] != nullptr; i++) { - local_file.SetFile(sdkroot_path.c_str(), false); + local_file.SetFile(sdkroot_path, false); if (paths_to_try[i][0] != '\0') local_file.AppendPathComponent(paths_to_try[i]); local_file.AppendPathComponent(platform_file_path); Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Wed Nov 2 15:34:10 2016 @@ -2475,7 +2475,7 @@ Error NativeProcessLinux::GetLoadedModul if (columns.size() < 6) return true; // continue searching - FileSpec this_file_spec(columns[5].str().c_str(), false); + FileSpec this_file_spec(columns[5].str(), false); if (this_file_spec.GetFilename() != module_file_spec.GetFilename()) return true; // continue searching Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Wed Nov 2 15:34:10 2016 @@ -880,8 +880,8 @@ GDBRemoteCommunication::CheckForPacket(c } } - m_history.AddPacket(m_bytes.c_str(), total_length, - History::ePacketTypeRecv, total_length); + m_history.AddPacket(m_bytes, total_length, History::ePacketTypeRecv, + total_length); // Clear packet_str in case there is some existing data in it. packet_str.clear(); Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Wed Nov 2 15:34:10 2016 @@ -345,7 +345,7 @@ void GDBRemoteCommunicationClient::GetRe packet.PutCString("qSupported"); for (uint32_t i = 0; i < features.size(); ++i) { packet.PutCString(i == 0 ? ":" : ";"); - packet.PutCString(features[i].c_str()); + packet.PutCString(features[i]); } StringExtractorGDBRemote response; @@ -1070,7 +1070,7 @@ void GDBRemoteCommunicationClient::Maybe if (avail_type != CompressionType::None) { StringExtractorGDBRemote response; std::string packet = "QEnableCompression:type:" + avail_name + ";"; - if (SendPacketAndWaitForResponse(packet.c_str(), response, false) != + if (SendPacketAndWaitForResponse(packet, response, false) != PacketResult::Success) return; @@ -1772,7 +1772,7 @@ bool GDBRemoteCommunicationClient::Decod // control the characters in a process name std::string name; extractor.GetHexByteString(name); - process_info.GetExecutableFile().SetFile(name.c_str(), false); + process_info.GetExecutableFile().SetFile(name, false); } else if (name.equals("cputype")) { value.getAsInteger(0, cpu); } else if (name.equals("cpusubtype")) { @@ -2015,7 +2015,7 @@ uint32_t GDBRemoteCommunicationClient::F match_info.GetProcessInfo().GetArchitecture(); const llvm::Triple &triple = match_arch.GetTriple(); packet.PutCString("triple:"); - packet.PutCString(triple.getTriple().c_str()); + packet.PutCString(triple.getTriple()); packet.PutChar(';'); } } @@ -3201,7 +3201,7 @@ bool GDBRemoteCommunicationClient::GetMo StringExtractor extractor(value); std::string path; extractor.GetHexByteString(path); - module_spec.GetFileSpec() = FileSpec(path.c_str(), false, arch_spec); + module_spec.GetFileSpec() = FileSpec(path, false, arch_spec); } } @@ -3322,7 +3322,7 @@ bool GDBRemoteCommunicationClient::ReadE << "," << std::hex << size; GDBRemoteCommunication::PacketResult res = - SendPacketAndWaitForResponse(packet.str().c_str(), chunk, false); + SendPacketAndWaitForResponse(packet.str(), chunk, false); if (res != GDBRemoteCommunication::PacketResult::Success) { err.SetErrorString("Error sending $qXfer packet"); @@ -3609,8 +3609,8 @@ Error GDBRemoteCommunicationClient::Conf // Send the packet. const bool send_async = false; StringExtractorGDBRemote response; - auto result = SendPacketAndWaitForResponse(stream.GetString().c_str(), - response, send_async); + auto result = + SendPacketAndWaitForResponse(stream.GetString(), response, send_async); if (result == PacketResult::Success) { // We failed if the config result comes back other than OK. if (strcmp(response.GetStringRef().c_str(), "OK") == 0) { Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Wed Nov 2 15:34:10 2016 @@ -358,8 +358,7 @@ GDBRemoteCommunicationServerCommon::Hand StringExtractor extractor(value); std::string file; extractor.GetHexByteString(file); - match_info.GetProcessInfo().GetExecutableFile().SetFile(file.c_str(), - false); + match_info.GetProcessInfo().GetExecutableFile().SetFile(file, false); } else if (key.equals("name_match")) { NameMatchType name_match = llvm::StringSwitch<NameMatchType>(value) @@ -644,8 +643,7 @@ GDBRemoteCommunicationServerCommon::Hand std::string path; packet.GetHexByteString(path); if (!path.empty()) { - lldb::user_id_t retcode = - FileSystem::GetFileSize(FileSpec(path.c_str(), false)); + lldb::user_id_t retcode = FileSystem::GetFileSize(FileSpec(path, false)); StreamString response; response.PutChar('F'); response.PutHex64(retcode); @@ -684,7 +682,7 @@ GDBRemoteCommunicationServerCommon::Hand std::string path; packet.GetHexByteString(path); if (!path.empty()) { - bool retcode = FileSystem::GetFileExists(FileSpec(path.c_str(), false)); + bool retcode = FileSystem::GetFileExists(FileSpec(path, false)); StreamString response; response.PutChar('F'); response.PutChar(','); @@ -776,7 +774,7 @@ GDBRemoteCommunicationServerCommon::Hand if (!path.empty()) { uint64_t a, b; StreamGDBRemote response; - if (!FileSystem::CalculateMD5(FileSpec(path.c_str(), false), a, b)) { + if (!FileSystem::CalculateMD5(FileSpec(path, false), a, b)) { response.PutCString("F,"); response.PutCString("x"); } else { @@ -1031,8 +1029,7 @@ GDBRemoteCommunicationServerCommon::Hand if (success) { if (arg_idx == 0) - m_process_launch_info.GetExecutableFile().SetFile(arg.c_str(), - false); + m_process_launch_info.GetExecutableFile().SetFile(arg, false); m_process_launch_info.GetArguments().AppendArgument(arg); if (log) log->Printf("LLGSPacketHandler::%s added arg %d: \"%s\"", @@ -1276,7 +1273,7 @@ FileSpec GDBRemoteCommunicationServerCom #ifdef __ANDROID__ return HostInfoAndroid::ResolveLibraryPath(module_path, arch); #else - return FileSpec(module_path.c_str(), true); + return FileSpec(module_path, true); #endif } @@ -1284,7 +1281,7 @@ ModuleSpec GDBRemoteCommunicationServerC const std::string &module_path, const std::string &triple) { ArchSpec arch(triple.c_str()); - const FileSpec req_module_path_spec(module_path.c_str(), true); + const FileSpec req_module_path_spec(module_path, true); const FileSpec module_path_spec = FindModuleFile(req_module_path_spec.GetPath(), arch); const ModuleSpec module_spec(module_path_spec, arch); Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Wed Nov 2 15:34:10 2016 @@ -667,7 +667,7 @@ GDBRemoteCommunicationServerLLGS::SendSt if (::strcspn(thread_name.c_str(), "$#+-;:") == thread_name_len) { response.PutCString("name:"); - response.PutCString(thread_name.c_str()); + response.PutCString(thread_name); } else { // The thread name contains special chars, send as hex bytes. response.PutCString("hexname:"); Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp Wed Nov 2 15:34:10 2016 @@ -128,7 +128,7 @@ Error GDBRemoteCommunicationServerPlatfo std::string platform_ip; int platform_port; std::string platform_path; - bool ok = UriParser::Parse(GetConnection()->GetURI().c_str(), platform_scheme, + bool ok = UriParser::Parse(GetConnection()->GetURI(), platform_scheme, platform_ip, platform_port, platform_path); UNUSED_IF_ASSERT_DISABLED(ok); assert(ok); Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Nov 2 15:34:10 2016 @@ -2321,7 +2321,7 @@ StateType ProcessGDBRemote::SetThreadSto reason = "watchpoint"; StreamString ostr; ostr.Printf("%" PRIu64 " %" PRIu32, wp_addr, wp_index); - description = ostr.GetString().c_str(); + description = ostr.GetString(); } else if (key.compare("library") == 0) { LoadModules(); } else if (key.size() == 2 && ::isxdigit(key[0]) && ::isxdigit(key[1])) { @@ -4579,7 +4579,7 @@ size_t ProcessGDBRemote::LoadModules(Loa if (!modInfo.get_link_map(link_map)) link_map = LLDB_INVALID_ADDRESS; - FileSpec file(mod_name.c_str(), true); + FileSpec file(mod_name, true); lldb::ModuleSP module_sp = LoadModuleAtAddress(file, link_map, mod_base, mod_base_is_offset); Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp Wed Nov 2 15:34:10 2016 @@ -1021,7 +1021,7 @@ uint32_t PythonFile::GetOptionsFromMode( if (mode.empty()) return 0; - return llvm::StringSwitch<uint32_t>(mode.str().c_str()) + return llvm::StringSwitch<uint32_t>(mode.str()) .Case("r", File::eOpenOptionRead) .Case("w", File::eOpenOptionWrite) .Case("a", File::eOpenOptionWrite | File::eOpenOptionAppend | Modified: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp (original) +++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp Wed Nov 2 15:34:10 2016 @@ -1818,7 +1818,7 @@ StructuredDataDarwinLog::DumpHeader(Stre // Display the activity chain, from parent-most to child-most // activity, separated by a colon (:). stream.PutCString("activity-chain="); - stream.PutCString(activity_chain.c_str()); + stream.PutCString(activity_chain); #else if (GetGlobalProperties()->GetDisplayActivityChain()) { // Display the activity chain, from parent-most to child-most @@ -1850,7 +1850,7 @@ StructuredDataDarwinLog::DumpHeader(Stre if (header_count > 0) stream.PutChar(','); stream.PutCString("subsystem="); - stream.PutCString(subsystem.c_str()); + stream.PutCString(subsystem); ++header_count; } } @@ -1862,14 +1862,14 @@ StructuredDataDarwinLog::DumpHeader(Stre if (header_count > 0) stream.PutChar(','); stream.PutCString("category="); - stream.PutCString(category.c_str()); + stream.PutCString(category); ++header_count; } } stream.PutCString("] "); auto &result = stream.GetString(); - output_stream.PutCString(result.c_str()); + output_stream.PutCString(result); return result.size(); } Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp Wed Nov 2 15:34:10 2016 @@ -140,7 +140,7 @@ void DWARFDebugPubnamesSet::Find( DescriptorConstIter pos; DescriptorConstIter end = m_descriptors.end(); for (pos = m_descriptors.begin(); pos != end; ++pos) { - if (regex.Execute(pos->name.c_str())) + if (regex.Execute(pos->name)) die_offset_coll.push_back(m_header.die_offset + pos->offset); } } Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Wed Nov 2 15:34:10 2016 @@ -470,7 +470,7 @@ void SymbolFilePDB::FindTypesByName(cons lldb_private::TypeMap &types) { auto global = m_session_up->getGlobalScope(); std::unique_ptr<IPDBEnumSymbols> results; - results = global->findChildren(PDB_SymType::None, name.c_str(), + results = global->findChildren(PDB_SymType::None, name, PDB_NameSearchFlags::NS_Default); uint32_t matches = 0; Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Nov 2 15:34:10 2016 @@ -6518,7 +6518,7 @@ CompilerType ClangASTContext::GetChildCo if (idx == child_idx) { // Print the member type if requested // Print the member name and equal sign - child_name.assign(field->getNameAsString().c_str()); + child_name.assign(field->getNameAsString()); // Figure out the type byte size (field_type_info.first) and // alignment (field_type_info.second) from the AST context. @@ -6577,7 +6577,7 @@ CompilerType ClangASTContext::GetChildCo superclass_interface_decl)); child_name.assign( - superclass_interface_decl->getNameAsString().c_str()); + superclass_interface_decl->getNameAsString()); clang::TypeInfo ivar_type_info = getASTContext()->getTypeInfo(ivar_qual_type.getTypePtr()); @@ -6608,7 +6608,7 @@ CompilerType ClangASTContext::GetChildCo clang::QualType ivar_qual_type(ivar_decl->getType()); - child_name.assign(ivar_decl->getNameAsString().c_str()); + child_name.assign(ivar_decl->getNameAsString()); clang::TypeInfo ivar_type_info = getASTContext()->getTypeInfo(ivar_qual_type.getTypePtr()); @@ -8205,14 +8205,14 @@ bool ClangASTContext::AddObjCClassProper std::string property_setter_no_colon( property_setter_name, strlen(property_setter_name) - 1); clang::IdentifierInfo *setter_ident = - &clang_ast->Idents.get(property_setter_no_colon.c_str()); + &clang_ast->Idents.get(property_setter_no_colon); setter_sel = clang_ast->Selectors.getSelector(1, &setter_ident); } else if (!(property_attributes & DW_APPLE_PROPERTY_readonly)) { std::string setter_sel_string("set"); setter_sel_string.push_back(::toupper(property_name[0])); setter_sel_string.append(&property_name[1]); clang::IdentifierInfo *setter_ident = - &clang_ast->Idents.get(setter_sel_string.c_str()); + &clang_ast->Idents.get(setter_sel_string); setter_sel = clang_ast->Selectors.getSelector(1, &setter_ident); } property_decl->setSetterName(setter_sel); @@ -9254,7 +9254,7 @@ bool ClangASTContext::DumpTypeValue( enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos) { if (enum_pos->getInitVal().getSExtValue() == enum_svalue) { - s->PutCString(enum_pos->getNameAsString().c_str()); + s->PutCString(enum_pos->getNameAsString()); return true; } } @@ -9268,7 +9268,7 @@ bool ClangASTContext::DumpTypeValue( enum_end_pos = enum_decl->enumerator_end(); enum_pos != enum_end_pos; ++enum_pos) { if (enum_pos->getInitVal().getZExtValue() == enum_uvalue) { - s->PutCString(enum_pos->getNameAsString().c_str()); + s->PutCString(enum_pos->getNameAsString()); return true; } } @@ -9438,7 +9438,7 @@ void ClangASTContext::DumpTypeDescriptio typedef_decl->getQualifiedNameAsString()); if (!clang_typedef_name.empty()) { s->PutCString("typedef "); - s->PutCString(clang_typedef_name.c_str()); + s->PutCString(clang_typedef_name); } } } break; @@ -9488,7 +9488,7 @@ void ClangASTContext::DumpTypeDescriptio } else { std::string clang_type_name(qual_type.getAsString()); if (!clang_type_name.empty()) - s->PutCString(clang_type_name.c_str()); + s->PutCString(clang_type_name); } } } Modified: lldb/trunk/source/Symbol/ObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Symbol/ObjectFile.cpp (original) +++ lldb/trunk/source/Symbol/ObjectFile.cpp Wed Nov 2 15:34:10 2016 @@ -582,7 +582,7 @@ bool ObjectFile::SplitArchivePathWithObj std::string obj; if (regex_match.GetMatchAtIndex(path_with_object, 1, path) && regex_match.GetMatchAtIndex(path_with_object, 2, obj)) { - archive_file.SetFile(path.c_str(), false); + archive_file.SetFile(path, false); archive_object.SetCString(obj.c_str()); if (must_exist && !archive_file.Exists()) return false; Modified: lldb/trunk/source/Symbol/SymbolContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Symbol/SymbolContext.cpp (original) +++ lldb/trunk/source/Symbol/SymbolContext.cpp Wed Nov 2 15:34:10 2016 @@ -913,7 +913,7 @@ bool SymbolContextSpecifier::SymbolConte if (m_module_sp.get() != sc.module_sp.get()) return false; } else { - FileSpec module_file_spec(m_module_spec.c_str(), false); + FileSpec module_file_spec(m_module_spec, false); if (!FileSpec::Equal(module_file_spec, sc.module_sp->GetFileSpec(), false)) return false; Modified: lldb/trunk/source/Target/Platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Target/Platform.cpp (original) +++ lldb/trunk/source/Target/Platform.cpp Wed Nov 2 15:34:10 2016 @@ -573,7 +573,7 @@ RecurseCopy_Callback(void *baton, FileSp FileSpec recurse_dst; recurse_dst.GetDirectory().SetCString(dst_dir.GetPath().c_str()); RecurseCopyBaton rc_baton2 = {recurse_dst, rc_baton->platform_ptr, Error()}; - FileSpec::EnumerateDirectory(src_dir_path.c_str(), true, true, true, + FileSpec::EnumerateDirectory(src_dir_path, true, true, true, RecurseCopy_Callback, &rc_baton2); if (rc_baton2.error.Fail()) { rc_baton->error.SetErrorString(rc_baton2.error.AsCString()); @@ -708,7 +708,7 @@ Error Platform::Install(const FileSpec & recurse_dst.GetDirectory().SetCString(fixed_dst.GetCString()); std::string src_dir_path(src.GetPath()); RecurseCopyBaton baton = {recurse_dst, this, Error()}; - FileSpec::EnumerateDirectory(src_dir_path.c_str(), true, true, true, + FileSpec::EnumerateDirectory(src_dir_path, true, true, true, RecurseCopy_Callback, &baton); return baton.error; } Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original) +++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Wed Nov 2 15:34:10 2016 @@ -384,7 +384,7 @@ bool ProcessLaunchInfo::ConvertArguments new_path += curr_path; } new_path += "\" "; - shell_command.PutCString(new_path.c_str()); + shell_command.PutCString(new_path); } if (triple.getOS() != llvm::Triple::Win32 || Modified: lldb/trunk/source/Target/TargetList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Target/TargetList.cpp (original) +++ lldb/trunk/source/Target/TargetList.cpp Wed Nov 2 15:34:10 2016 @@ -372,7 +372,7 @@ Error TargetList::CreateTargetInternal(D std::string cwd_user_exe_path(cwd); cwd_user_exe_path += '/'; cwd_user_exe_path += user_exe_path; - FileSpec cwd_file(cwd_user_exe_path.c_str(), false); + FileSpec cwd_file(cwd_user_exe_path, false); if (cwd_file.Exists()) file = cwd_file; } Modified: lldb/trunk/source/Utility/ModuleCache.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ModuleCache.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/source/Utility/ModuleCache.cpp (original) +++ lldb/trunk/source/Utility/ModuleCache.cpp Wed Nov 2 15:34:10 2016 @@ -82,8 +82,7 @@ FileSpec GetModuleDirectory(const FileSp } FileSpec GetSymbolFileSpec(const FileSpec &module_file_spec) { - return FileSpec((module_file_spec.GetPath() + kSymFileExtension).c_str(), - false); + return FileSpec(module_file_spec.GetPath() + kSymFileExtension, false); } void DeleteExistingModule(const FileSpec &root_dir_spec, @@ -199,8 +198,8 @@ Error ModuleCache::Put(const FileSpec &r JoinPath(module_spec_dir, target_file.GetFilename().AsCString()); const auto tmp_file_path = tmp_file.GetPath(); - const auto err_code = llvm::sys::fs::rename( - tmp_file_path.c_str(), module_file_path.GetPath().c_str()); + const auto err_code = + llvm::sys::fs::rename(tmp_file_path, module_file_path.GetPath()); if (err_code) return Error("Failed to rename file %s to %s: %s", tmp_file_path.c_str(), module_file_path.GetPath().c_str(), @@ -295,7 +294,7 @@ Error ModuleCache::GetAndPut(const FileS const auto tmp_download_file_spec = JoinPath(module_spec_dir, kTempFileName); error = module_downloader(module_spec, tmp_download_file_spec); - llvm::FileRemover tmp_file_remover(tmp_download_file_spec.GetPath().c_str()); + llvm::FileRemover tmp_file_remover(tmp_download_file_spec.GetPath()); if (error.Fail()) return Error("Failed to download module: %s", error.AsCString()); @@ -315,8 +314,7 @@ Error ModuleCache::GetAndPut(const FileS const auto tmp_download_sym_file_spec = JoinPath(module_spec_dir, kTempSymFileName); error = symfile_downloader(cached_module_sp, tmp_download_sym_file_spec); - llvm::FileRemover tmp_symfile_remover( - tmp_download_sym_file_spec.GetPath().c_str()); + llvm::FileRemover tmp_symfile_remover(tmp_download_sym_file_spec.GetPath()); if (error.Fail()) // Failed to download a symfile but fetching the module was successful. The // module might Modified: lldb/trunk/tools/lldb-server/Acceptor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/Acceptor.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/tools/lldb-server/Acceptor.cpp (original) +++ lldb/trunk/tools/lldb-server/Acceptor.cpp Wed Nov 2 15:34:10 2016 @@ -58,13 +58,13 @@ const char *FindSchemeByProtocol(const S } Error Acceptor::Listen(int backlog) { - return m_listener_socket_up->Listen(StringRef(m_name.c_str()), backlog); + return m_listener_socket_up->Listen(StringRef(m_name), backlog); } Error Acceptor::Accept(const bool child_processes_inherit, Connection *&conn) { Socket *conn_socket = nullptr; auto error = m_listener_socket_up->Accept( - StringRef(m_name.c_str()), child_processes_inherit, conn_socket); + StringRef(m_name), child_processes_inherit, conn_socket); if (error.Success()) conn = new ConnectionFileDescriptor(conn_socket); Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original) +++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Wed Nov 2 15:34:10 2016 @@ -124,8 +124,7 @@ static Error save_socket_id_to_file(cons temp_file << socket_id; } - err_code = llvm::sys::fs::rename(temp_file_path.c_str(), - file_spec.GetPath().c_str()); + err_code = llvm::sys::fs::rename(temp_file_path.c_str(), file_spec.GetPath()); if (err_code) return Error("Failed to rename file %s to %s: %s", temp_file_path.c_str(), file_spec.GetPath().c_str(), err_code.message().c_str()); Modified: lldb/trunk/unittests/Host/SocketTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/SocketTest.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/unittests/Host/SocketTest.cpp (original) +++ lldb/trunk/unittests/Host/SocketTest.cpp Wed Nov 2 15:34:10 2016 @@ -79,7 +79,7 @@ protected: std::unique_ptr<SocketType> connect_socket_up( new SocketType(child_processes_inherit, error)); EXPECT_FALSE(error.Fail()); - error = connect_socket_up->Connect(connect_remote_address.c_str()); + error = connect_socket_up->Connect(connect_remote_address); EXPECT_FALSE(error.Fail()); EXPECT_TRUE(connect_socket_up->IsValid()); Modified: lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp?rev=285855&r1=285854&r2=285855&view=diff ============================================================================== --- lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp (original) +++ lldb/trunk/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp Wed Nov 2 15:34:10 2016 @@ -487,7 +487,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_ std::string sizeof_var = "sizeof_"; sizeof_var.append(Enum); - EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var.c_str()), + EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var), enum_type->GetByteSize()); } } @@ -535,7 +535,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_ std::string sizeof_var = "sizeof_"; sizeof_var.append(Typedef); - EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var.c_str()), + EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var), typedef_type->GetByteSize()); } } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits