mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 22:56:06 +00:00

This is the first step in getting ConnectionFileDescriptor ported to Windows. It implements a connection against a disk file for windows. This supports connection strings of the form file://PATH which are currently supported only on posix platforms in ConnectionFileDescriptor. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5608 llvm-svn: 219145
41 lines
923 B
C++
41 lines
923 B
C++
//===-- Connection.cpp ------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// C Includes
|
|
// C++ Includes
|
|
// Other libraries and framework includes
|
|
// Project includes
|
|
#include "lldb/Core/Connection.h"
|
|
|
|
#if defined(_WIN32)
|
|
#include "lldb/Host/windows/ConnectionGenericFileWindows.h"
|
|
#endif
|
|
|
|
#include "lldb/Host/ConnectionFileDescriptor.h"
|
|
|
|
using namespace lldb_private;
|
|
|
|
Connection::Connection ()
|
|
{
|
|
}
|
|
|
|
Connection::~Connection ()
|
|
{
|
|
}
|
|
|
|
Connection *
|
|
Connection::CreateDefaultConnection(const char *url)
|
|
{
|
|
#if defined(_WIN32)
|
|
if (strstr(url, "file://") == url)
|
|
return new ConnectionGenericFile();
|
|
#endif
|
|
return new ConnectionFileDescriptor();
|
|
}
|