diff options
Diffstat (limited to 'lldb/tools/lldb-server')
-rw-r--r-- | lldb/tools/lldb-server/Acceptor.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-server/Acceptor.h | 6 | ||||
-rw-r--r-- | lldb/tools/lldb-server/LLDBServerUtilities.h | 6 | ||||
-rw-r--r-- | lldb/tools/lldb-server/SystemInitializerLLGS.h | 6 | ||||
-rw-r--r-- | lldb/tools/lldb-server/lldb-platform.cpp | 4 |
5 files changed, 15 insertions, 9 deletions
diff --git a/lldb/tools/lldb-server/Acceptor.cpp b/lldb/tools/lldb-server/Acceptor.cpp index 2cfb34d215c8..b8be9c5c2661 100644 --- a/lldb/tools/lldb-server/Acceptor.cpp +++ b/lldb/tools/lldb-server/Acceptor.cpp @@ -118,7 +118,7 @@ std::unique_ptr<Acceptor> Acceptor::Create(StringRef name, return (local_port != 0) ? llvm::to_string(local_port) : ""; }; } else { - const std::string socket_name = name; + const std::string socket_name = std::string(name); local_socket_id = [socket_name]() { return socket_name; }; } diff --git a/lldb/tools/lldb-server/Acceptor.h b/lldb/tools/lldb-server/Acceptor.h index 1e7337f14113..b441e92dcd22 100644 --- a/lldb/tools/lldb-server/Acceptor.h +++ b/lldb/tools/lldb-server/Acceptor.h @@ -5,8 +5,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#ifndef lldb_server_Acceptor_h_ -#define lldb_server_Acceptor_h_ +#ifndef LLDB_TOOLS_LLDB_SERVER_ACCEPTOR_H +#define LLDB_TOOLS_LLDB_SERVER_ACCEPTOR_H #include "lldb/Host/Socket.h" #include "lldb/Utility/Connection.h" @@ -57,4 +57,4 @@ private: } // namespace lldb_server } // namespace lldb_private -#endif // lldb_server_Acceptor_h_ +#endif // LLDB_TOOLS_LLDB_SERVER_ACCEPTOR_H diff --git a/lldb/tools/lldb-server/LLDBServerUtilities.h b/lldb/tools/lldb-server/LLDBServerUtilities.h index 3ade1f9f5b8a..b59d1e411540 100644 --- a/lldb/tools/lldb-server/LLDBServerUtilities.h +++ b/lldb/tools/lldb-server/LLDBServerUtilities.h @@ -1,3 +1,7 @@ +#ifndef LLDB_TOOLS_LLDB_SERVER_LLDBSERVERUTILITIES_H + +#define LLDB_TOOLS_LLDB_SERVER_LLDBSERVERUTILITIES_H + //===-- LLDBServerUtilities.h -----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -21,3 +25,5 @@ public: }; } } + +#endif diff --git a/lldb/tools/lldb-server/SystemInitializerLLGS.h b/lldb/tools/lldb-server/SystemInitializerLLGS.h index 59a1fa14e81c..f3d015e94f8c 100644 --- a/lldb/tools/lldb-server/SystemInitializerLLGS.h +++ b/lldb/tools/lldb-server/SystemInitializerLLGS.h @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_SYSTEMINITIALIZERLLGS_H -#define LLDB_SYSTEMINITIALIZERLLGS_H +#ifndef LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H +#define LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H #include "lldb/Initialization/SystemInitializer.h" #include "lldb/Initialization/SystemInitializerCommon.h" @@ -18,4 +18,4 @@ public: void Terminate() override; }; -#endif // LLDB_SYSTEMINITIALIZERLLGS_H +#endif // LLDB_TOOLS_LLDB_SERVER_SYSTEMINITIALIZERLLGS_H diff --git a/lldb/tools/lldb-server/lldb-platform.cpp b/lldb/tools/lldb-server/lldb-platform.cpp index a6fb5639d642..33f918ffc2a1 100644 --- a/lldb/tools/lldb-server/lldb-platform.cpp +++ b/lldb/tools/lldb-server/lldb-platform.cpp @@ -96,7 +96,7 @@ static void display_usage(const char *progname, const char *subcommand) { static Status save_socket_id_to_file(const std::string &socket_id, const FileSpec &file_spec) { - FileSpec temp_file_spec(file_spec.GetDirectory().AsCString()); + FileSpec temp_file_spec(file_spec.GetDirectory().GetStringRef()); Status error(llvm::sys::fs::create_directory(temp_file_spec.GetPath())); if (error.Fail()) return Status("Failed to create directory %s: %s", @@ -343,7 +343,7 @@ int main_platform(int argc, char *argv[]) { // connections while a connection is active. acceptor_up.reset(); } - platform.SetConnection(conn); + platform.SetConnection(std::unique_ptr<Connection>(conn)); if (platform.IsConnected()) { if (inferior_arguments.GetArgumentCount() > 0) { |