xref: /freebsd/contrib/llvm-project/lldb/source/Host/common/PipeBase.cpp (revision e25152834cdf3b353892835a4f3b157e066a8ed4)
1  //===-- source/Host/common/PipeBase.cpp -----------------------------------===//
2  //
3  // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4  // See https://llvm.org/LICENSE.txt for license information.
5  // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6  //
7  //===----------------------------------------------------------------------===//
8  
9  #include "lldb/Host/PipeBase.h"
10  
11  using namespace lldb_private;
12  
13  PipeBase::~PipeBase() = default;
14  
OpenAsWriter(llvm::StringRef name,bool child_process_inherit)15  Status PipeBase::OpenAsWriter(llvm::StringRef name,
16                                bool child_process_inherit) {
17    return OpenAsWriterWithTimeout(name, child_process_inherit,
18                                   std::chrono::microseconds::zero());
19  }
20  
Read(void * buf,size_t size,size_t & bytes_read)21  Status PipeBase::Read(void *buf, size_t size, size_t &bytes_read) {
22    return ReadWithTimeout(buf, size, std::chrono::microseconds::zero(),
23                           bytes_read);
24  }
25