Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- Connection.cpp ------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // C Includes |
| 11 | // C++ Includes |
| 12 | // Other libraries and framework includes |
| 13 | // Project includes |
| 14 | #include "lldb/Core/Connection.h" |
| 15 | |
Zachary Turner | 12792af | 2014-10-06 21:23:09 +0000 | [diff] [blame] | 16 | #if defined(_WIN32) |
| 17 | #include "lldb/Host/windows/ConnectionGenericFileWindows.h" |
| 18 | #endif |
| 19 | |
| 20 | #include "lldb/Host/ConnectionFileDescriptor.h" |
| 21 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 22 | using namespace lldb_private; |
| 23 | |
| 24 | Connection::Connection () |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | Connection::~Connection () |
| 29 | { |
| 30 | } |
Zachary Turner | 12792af | 2014-10-06 21:23:09 +0000 | [diff] [blame] | 31 | |
| 32 | Connection * |
| 33 | Connection::CreateDefaultConnection(const char *url) |
| 34 | { |
| 35 | #if defined(_WIN32) |
| 36 | if (strstr(url, "file://") == url) |
| 37 | return new ConnectionGenericFile(); |
| 38 | #endif |
| 39 | return new ConnectionFileDescriptor(); |
| 40 | } |