LLVM API Documentation

llvm::formatted_raw_ostream Class Reference

#include <FormattedStream.h>

Inheritance diagram for llvm::formatted_raw_ostream:
[legend]
Collaboration diagram for llvm::formatted_raw_ostream:
[legend]

List of all members.

Public Member Functions

 formatted_raw_ostream (raw_ostream &Stream, bool Delete=false)
 formatted_raw_ostream ()
 ~formatted_raw_ostream ()
void setStream (raw_ostream &Stream, bool Delete=false)
void PadToColumn (unsigned NewCol)

Static Public Attributes

static const bool DELETE_STREAM = true
static const bool PRESERVE_STREAM = false
static const unsigned MAX_COLUMN_PAD = 100


Detailed Description

formatted_raw_ostream - Formatted raw_fd_ostream to handle asm-specific constructs.

Definition at line 25 of file FormattedStream.h.


Constructor & Destructor Documentation

llvm::formatted_raw_ostream::formatted_raw_ostream ( raw_ostream &  Stream,
bool  Delete = false 
) [inline]

formatted_raw_ostream - Open the specified file for writing. If an error occurs, information about the error is put into ErrorInfo, and the stream should be immediately destroyed; the string will be empty if no error occurred.

As a side effect, the given Stream is set to be Unbuffered. This is because formatted_raw_ostream does its own buffering, so it doesn't want another layer of buffering to be happening underneath it.

Definition at line 89 of file FormattedStream.h.

References setStream().

llvm::formatted_raw_ostream::formatted_raw_ostream (  )  [inline, explicit]

Definition at line 93 of file FormattedStream.h.

llvm::formatted_raw_ostream::~formatted_raw_ostream (  )  [inline]

Definition at line 98 of file FormattedStream.h.

References llvm::raw_ostream::flush().


Member Function Documentation

void llvm::formatted_raw_ostream::setStream ( raw_ostream &  Stream,
bool  Delete = false 
) [inline]

void formatted_raw_ostream::PadToColumn ( unsigned  NewCol  ) 

PadToColumn - Align the output to some column number. If the current column is already equal to or more than NewCol, PadToColumn inserts one space.

Parameters:
NewCol - The column to move to.
PadToColumn - Align the output to some column number.

Parameters:
NewCol - The column to move to.
MinPad - The minimum space to give after the most recent I/O, even if the current column + minpad > newcol.

Definition at line 61 of file FormattedStream.cpp.

References llvm::raw_ostream::getBufferStart(), llvm::raw_ostream::GetNumBytesInBuffer(), MAX_COLUMN_PAD, and llvm::raw_ostream::write().

Referenced by llvm::AsmPrinter::EmitComments(), llvm::AsmPrinter::EmitConstantPool(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::AsmPrinter::EOL(), llvm::AsmPrinter::printBasicBlockLabel(), PrintChildLoopComment(), llvm::X86IntelAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), and llvm::AsmPrinter::printImplicitDef().


Member Data Documentation

DELETE_STREAM - Tell the destructor to delete the held stream.

Definition at line 29 of file FormattedStream.h.

PRESERVE_STREAM - Tell the destructor to not delete the held stream.

Definition at line 34 of file FormattedStream.h.

MAX_COLUMN_PAD - This is the maximum column padding we ever expect to see.

Definition at line 39 of file FormattedStream.h.

Referenced by PadToColumn().


The documentation for this class was generated from the following files: