LLVM API Documentation
#include <raw_ostream.h>
Public Member Functions | |
raw_svector_ostream (SmallVectorImpl< char > &O) | |
~raw_svector_ostream () | |
void | resync () |
StringRef | str () |
![]() | |
raw_ostream (bool unbuffered=false) | |
virtual | ~raw_ostream () |
uint64_t | tell () const |
tell - Return the current offset with the file. More... | |
void | SetBuffered () |
void | SetBufferSize (size_t Size) |
size_t | GetBufferSize () const |
void | SetUnbuffered () |
size_t | GetNumBytesInBuffer () const |
void | flush () |
raw_ostream & | operator<< (char C) |
raw_ostream & | operator<< (unsigned char C) |
raw_ostream & | operator<< (signed char C) |
raw_ostream & | operator<< (StringRef Str) |
raw_ostream & | operator<< (const char *Str) |
raw_ostream & | operator<< (const std::string &Str) |
raw_ostream & | operator<< (unsigned long N) |
raw_ostream & | operator<< (long N) |
raw_ostream & | operator<< (unsigned long long N) |
raw_ostream & | operator<< (long long N) |
raw_ostream & | operator<< (const void *P) |
raw_ostream & | operator<< (unsigned int N) |
raw_ostream & | operator<< (int N) |
raw_ostream & | operator<< (double N) |
raw_ostream & | write_hex (unsigned long long N) |
write_hex - Output N in hexadecimal, without any prefix or padding. More... | |
raw_ostream & | write_escaped (StringRef Str, bool UseHexEscapes=false) |
raw_ostream & | write (unsigned char C) |
raw_ostream & | write (const char *Ptr, size_t Size) |
raw_ostream & | operator<< (const format_object_base &Fmt) |
raw_ostream & | indent (unsigned NumSpaces) |
indent - Insert 'NumSpaces' spaces. More... | |
virtual raw_ostream & | changeColor (enum Colors Color, bool Bold=false, bool BG=false) |
virtual raw_ostream & | resetColor () |
virtual raw_ostream & | reverseColor () |
Reverses the forground and background colors. More... | |
virtual bool | is_displayed () const |
virtual bool | has_colors () const |
This function determines if this stream is displayed and supports colors. More... | |
Additional Inherited Members | |
![]() | |
enum | Colors { BLACK =0, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, SAVEDCOLOR } |
![]() | |
void | SetBuffer (char *BufferStart, size_t Size) |
virtual size_t | preferred_buffer_size () const |
const char * | getBufferStart () const |
raw_svector_ostream - A raw_ostream that writes to an SmallVector or SmallString. This is a simple adaptor class. This class does not encounter output errors.
Definition at line 450 of file raw_ostream.h.
|
explicit |
Construct a new raw_svector_ostream.
O | The vector to write to; this should generally have at least 128 bytes free to avoid any extraneous memory overhead. |
Definition at line 699 of file raw_ostream.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::capacity(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::reserve(), llvm::raw_ostream::SetBuffer(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
raw_svector_ostream::~raw_svector_ostream | ( | ) |
Definition at line 708 of file raw_ostream.cpp.
References llvm::raw_ostream::flush().
void raw_svector_ostream::resync | ( | ) |
resync - This is called when the SmallVector we're appending to is changed outside of the raw_svector_ostream's control. It is only safe to do this if the raw_svector_ostream has previously been flushed.
Definition at line 716 of file raw_ostream.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::capacity(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::raw_ostream::GetNumBytesInBuffer(), llvm::SmallVectorImpl< T >::reserve(), llvm::raw_ostream::SetBuffer(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by emitComments(), and llvm::StructType::setName().
StringRef raw_svector_ostream::str | ( | ) |
str - Flushes the stream contents to the target vector and return a StringRef for the vector contents.
Definition at line 750 of file raw_ostream.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::raw_ostream::flush(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::NVPTXAsmPrinter::doInitialization(), llvm::MCDwarfLineAddr::Emit(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), emitDebugValueComment(), llvm::MipsAsmPrinter::EmitFunctionBodyStart(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::MCStreamer::EmitSLEB128IntValue(), llvm::MCStreamer::EmitULEB128IntValue(), llvm::opt::Arg::getAsString(), llvm::ExecutionEngine::getConstantValue(), LLVMDisasmInstruction(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::opt::Arg::render(), llvm::report_fatal_error(), and llvm::StructType::setName().