Files
llvm/lldb/source/Core/StreamFile.cpp
Zachary Turner 2f3df6137a iwyu fixes for lldbCore.
This adjusts header file includes for headers and source files
in Core.  In doing so, one dependency cycle is eliminated
because all the includes from Core to that project were dead
includes anyway.  In places where some files in other projects
were only compiling due to a transitive include from another
header, fixups have been made so that those files also include
the header they need.  Tested on Windows and Linux, and plan
to address failures on OSX and FreeBSD after watching the
bots.

llvm-svn: 299714
2017-04-06 21:28:29 +00:00

48 lines
1.5 KiB
C++

//===-- StreamFile.cpp ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Core/StreamFile.h"
#include <stdio.h>
using namespace lldb;
using namespace lldb_private;
//----------------------------------------------------------------------
// StreamFile constructor
//----------------------------------------------------------------------
StreamFile::StreamFile() : Stream(), m_file() {}
StreamFile::StreamFile(uint32_t flags, uint32_t addr_size, ByteOrder byte_order)
: Stream(flags, addr_size, byte_order), m_file() {}
StreamFile::StreamFile(int fd, bool transfer_ownership)
: Stream(), m_file(fd, transfer_ownership) {}
StreamFile::StreamFile(FILE *fh, bool transfer_ownership)
: Stream(), m_file(fh, transfer_ownership) {}
StreamFile::StreamFile(const char *path)
: Stream(),
m_file(path, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
File::eOpenOptionCloseOnExec,
lldb::eFilePermissionsFileDefault) {}
StreamFile::StreamFile(const char *path, uint32_t options, uint32_t permissions)
: Stream(), m_file(path, options, permissions) {}
StreamFile::~StreamFile() {}
void StreamFile::Flush() { m_file.Flush(); }
size_t StreamFile::Write(const void *s, size_t length) {
m_file.Write(s, length);
return length;
}