summaryrefslogtreecommitdiff
path: root/source/Host/common/Host.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/common/Host.cpp')
-rw-r--r--source/Host/common/Host.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp
index af0b57248922..29e5991d31aa 100644
--- a/source/Host/common/Host.cpp
+++ b/source/Host/common/Host.cpp
@@ -58,6 +58,7 @@
#include "lldb/Host/Predicate.h"
#include "lldb/Host/ProcessLauncher.h"
#include "lldb/Host/ThreadLauncher.h"
+#include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
#include "lldb/Target/FileAction.h"
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/UnixSignals.h"
@@ -73,6 +74,7 @@
#include "llvm/Support/FileSystem.h"
#if defined(_WIN32)
+#include "lldb/Host/windows/ConnectionGenericFileWindows.h"
#include "lldb/Host/windows/ProcessLauncherWindows.h"
#else
#include "lldb/Host/posix/ProcessLauncherPosixFork.h"
@@ -624,6 +626,14 @@ const UnixSignalsSP &Host::GetUnixSignals() {
return s_unix_signals_sp;
}
+std::unique_ptr<Connection> Host::CreateDefaultConnection(llvm::StringRef url) {
+#if defined(_WIN32)
+ if (url.startswith("file://"))
+ return std::unique_ptr<Connection>(new ConnectionGenericFile());
+#endif
+ return std::unique_ptr<Connection>(new ConnectionFileDescriptor());
+}
+
#if defined(LLVM_ON_UNIX)
WaitStatus WaitStatus::Decode(int wstatus) {
if (WIFEXITED(wstatus))