//===-- FifoFiles.h ---------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_TOOLS_LLDB_DAP_FIFOFILES_H #define LLDB_TOOLS_LLDB_DAP_FIFOFILES_H #include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX #include "llvm/Support/Error.h" #include "JSONUtils.h" #include <chrono> namespace lldb_dap { /// Struct that controls the life of a fifo file in the filesystem. /// /// The file is destroyed when the destructor is invoked. struct FifoFile { … }; /// Create a fifo file in the filesystem. /// /// \param[in] path /// The path for the fifo file. /// /// \return /// A \a std::shared_ptr<FifoFile> if the file could be created, or an /// \a llvm::Error in case of failures. llvm::Expected<std::shared_ptr<FifoFile>> CreateFifoFile(llvm::StringRef path); class FifoFileIO { … }; } // namespace lldb_dap #endif // LLDB_TOOLS_LLDB_DAP_FIFOFILES_H