  13| #include "llvm/Support/raw_ostream.h"
  14| #include "llvm/ADT/StringExtras.h"
  15| #include "llvm/Config/config.h"
  16| #include "llvm/Support/AutoConvert.h"
  17| #include "llvm/Support/Compiler.h"
  18| #include "llvm/Support/Duration.h"
  19| #include "llvm/Support/ErrorHandling.h"
  20| #include "llvm/Support/FileSystem.h"
  21| #include "llvm/Support/Format.h"
  22| #include "llvm/Support/FormatVariadic.h"
  23| #include "llvm/Support/IOSandbox.h"
  24| #include "llvm/Support/MathExtras.h"
  25| #include "llvm/Support/NativeFormatting.h"
  26| #include "llvm/Support/Process.h"
  27| #include "llvm/Support/Program.h"
  28| #include <algorithm>
  29| #include <cerrno>
  30| #include <cstdio>
  31| #include <sys/stat.h>
  34| # include <fcntl.h>
  36| #if defined(HAVE_UNISTD_H)
  37| # include <unistd.h>
  38| #endif
  40| #if defined(__CYGWIN__)
  41| #include <io.h>
  42| #endif
  44| #if defined(_MSC_VER)
  45| #include <io.h>
  46| #ifndef STDIN_FILENO
  47| # define STDIN_FILENO 0
  48| #endif
  49| #ifndef STDOUT_FILENO
  50| # define STDOUT_FILENO 1
  51| #endif
  52| #ifndef STDERR_FILENO
  53| # define STDERR_FILENO 2
  54| #endif
  55| #endif
  57| #ifdef _WIN32
  58| #include "llvm/Support/ConvertUTF.h"
  59| #include "llvm/Support/Signals.h"
  60| #include "llvm/Support/Windows/WindowsSupport.h"
  61| #endif
  63| using namespace llvm;
  65| raw_ostream::~raw_ostream() {
  75| size_t raw_ostream::preferred_buffer_size() const {
  87| void raw_ostream::SetBuffered() {
  96| void raw_ostream::SetBufferAndMode(char *BufferStart, size_t Size,
  97|                                    BufferKind Mode) {
 115| raw_ostream &raw_ostream::operator<<(unsigned long N) {
 120| raw_ostream &raw_ostream::operator<<(long N) {
 125|

... [truncated 5093 chars] ...

raw_svector_ostream::write_impl(const char *Ptr, size_t Size) {
 972| void raw_svector_ostream::pwrite_impl(const char *Ptr, size_t Size,
 973|                                       uint64_t Offset) {
 977| bool raw_svector_ostream::classof(const raw_ostream *OS) {
 985| raw_null_ostream::~raw_null_ostream() {
 994| void raw_null_ostream::write_impl(const char *Ptr, size_t Size) {
 997| uint64_t raw_null_ostream::current_pos() const {
1001| void raw_null_ostream::pwrite_impl(const char *Ptr, size_t Size,
1002|                                    uint64_t Offset) {}
1004| void raw_pwrite_stream::anchor() {}
1006| void buffer_ostream::anchor() {}
1008| void buffer_unique_ostream::anchor() {}
1010| Error llvm::writeToOutput(StringRef OutputFileName,
1011|                           std::function<Error(raw_ostream &)> Write) {