diff options
author | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-11-02 20:34:10 +0000 |
---|---|---|
committer | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-11-02 20:34:10 +0000 |
commit | 771ef6d4f15452d76387cd66552a38122be60925 (patch) | |
tree | 78449c43ffd29ef2bd0801c9f8bf80fced0ef3e4 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | |
parent | 7463adadbf0ab2742b122a3d4adc8e2041c3ac01 (diff) | |
download | bcm5719-llvm-771ef6d4f15452d76387cd66552a38122be60925.tar.gz bcm5719-llvm-771ef6d4f15452d76387cd66552a38122be60925.zip |
Fix Clang-tidy readability-redundant-string-cstr warnings
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits
Differential Revision: https://reviews.llvm.org/D26233
llvm-svn: 285855
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 7c46c21261d..28d94f8949a 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -358,8 +358,7 @@ GDBRemoteCommunicationServerCommon::Handle_qfProcessInfo( 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::Handle_vFile_Size( 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::Handle_vFile_Exists( 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::Handle_vFile_MD5( 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::Handle_A(StringExtractorGDBRemote &packet) { 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 GDBRemoteCommunicationServerCommon::FindModuleFile( #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 GDBRemoteCommunicationServerCommon::GetModuleInfo( 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); |