diff options
author | Fangrui Song <i@maskray.me> | 2022-12-18 01:15:25 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-18 01:15:25 +0000 |
commit | fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd (patch) | |
tree | 735c071463e87ff80c30d1bb2b4528fc8aa1a8a9 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | a3400191137e7c991b89ebe72211790dae1648a1 (diff) | |
download | llvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.zip llvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.tar.gz llvm-fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.tar.bz2 |
[lldb] Remove redundant .c_str() and .get() calls
Removing .c_str() has a semantics difference, but the use scenarios
likely do not matter as we don't have NUL in the strings.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 13446d5..82401ad 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1501,7 +1501,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qGetWorkingDir( FileSpec working_dir{m_process_launch_info.GetWorkingDirectory()}; if (working_dir) { StreamString response; - response.PutStringAsRawHex8(working_dir.GetPath().c_str()); + response.PutStringAsRawHex8(working_dir.GetPath()); return SendPacketNoLock(response.GetString()); } @@ -3197,7 +3197,7 @@ GDBRemoteCommunicationServerLLGS::ReadXferObject(llvm::StringRef object, response.Printf("<library-list-svr4 version=\"1.0\">"); for (auto const &library : *library_list) { response.Printf("<library name=\"%s\" ", - XMLEncodeAttributeValue(library.name.c_str()).c_str()); + XMLEncodeAttributeValue(library.name).c_str()); response.Printf("lm=\"0x%" PRIx64 "\" ", library.link_map); response.Printf("l_addr=\"0x%" PRIx64 "\" ", library.base_addr); response.Printf("l_ld=\"0x%" PRIx64 "\" />", library.ld_addr); |