class raw_fd_stream

Declaration

class raw_fd_stream : public raw_fd_ostream { /* full declaration omitted */ };

Description

A raw_ostream of a file for reading/writing/seeking.

Declared at: llvm/include/llvm/Support/raw_ostream.h:601

Inherits from: raw_fd_ostream

Member Variables

Inherited from raw_ostream:

public static BLACK = Colors::BLACK
public static RED = Colors::RED
public static GREEN = Colors::GREEN
public static YELLOW = Colors::YELLOW
public static BLUE = Colors::BLUE
public static MAGENTA = Colors::MAGENTA
public static CYAN = Colors::CYAN
public static WHITE = Colors::WHITE
public static SAVEDCOLOR = Colors::SAVEDCOLOR
public static RESET = Colors::RESET

Method Overview

  • public static bool classof(const llvm::raw_ostream * OS)
  • public raw_fd_stream(llvm::StringRef Filename, std::error_code & EC)
  • public ssize_t read(char * Ptr, size_t Size)

Inherited from raw_fd_ostream:

Inherited from raw_pwrite_stream:

Inherited from raw_ostream:

Methods

static bool classof(const llvm::raw_ostream* OS)

Description

Check if \p OS is a pointer of type raw_fd_stream*.

Declared at: llvm/include/llvm/Support/raw_ostream.h:620

Parameters

const llvm::raw_ostream* OS

raw_fd_stream(llvm::StringRef Filename,
              std::error_code& EC)

Description

Open the specified file for reading/writing/seeking. If an error occurs, information about the error is put into EC, and the stream should be immediately destroyed.

Declared at: llvm/include/llvm/Support/raw_ostream.h:606

Parameters

llvm::StringRef Filename
std::error_code& EC

ssize_t read(char* Ptr, size_t Size)

Description

This reads the \p Size bytes into a buffer pointed by \p Ptr. On success, the number of bytes read is returned, and the file position is advanced by this number. On error, -1 is returned, use error() to get the error code.

Declared at: llvm/include/llvm/Support/raw_ostream.h:617

Parameters

char* Ptr
The start of the buffer to hold data to be read.
size_t Size
The number of bytes to be read.