LLVM  14.0.0git
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
llvm::raw_ostream Class Referenceabstract

This class implements an extremely fast bulk output stream that can only output to a stream. More...

#include "llvm/Support/raw_ostream.h"

Inheritance diagram for llvm::raw_ostream:
Inheritance graph
[legend]
Collaboration diagram for llvm::raw_ostream:
Collaboration graph
[legend]

Public Types

enum  OStreamKind { OStreamKind::OK_OStream, OStreamKind::OK_FDStream }
 
enum  Colors {
  Colors::BLACK = 0, Colors::RED, Colors::GREEN, Colors::YELLOW,
  Colors::BLUE, Colors::MAGENTA, Colors::CYAN, Colors::WHITE,
  Colors::SAVEDCOLOR, Colors::RESET
}
 
using uuid_t = uint8_t[16]
 Output a formatted UUID with dash separators. More...
 

Public Member Functions

 raw_ostream (bool unbuffered=false, OStreamKind K=OStreamKind::OK_OStream)
 
 raw_ostream (const raw_ostream &)=delete
 
void operator= (const raw_ostream &)=delete
 
virtual ~raw_ostream ()
 
uint64_t tell () const
 tell - Return the current offset with the file. More...
 
OStreamKind get_kind () const
 
virtual void reserveExtraSpace (uint64_t ExtraSize)
 If possible, pre-allocate ExtraSize bytes for stream data. More...
 
void SetBuffered ()
 Set the stream to be buffered, with an automatically determined buffer size. More...
 
void SetBufferSize (size_t Size)
 Set the stream to be buffered, using the specified buffer size. More...
 
size_t GetBufferSize () const
 
void SetUnbuffered ()
 Set the stream to be unbuffered. More...
 
size_t GetNumBytesInBuffer () const
 
void flush ()
 
raw_ostreamoperator<< (char C)
 
raw_ostreamoperator<< (unsigned char C)
 
raw_ostreamoperator<< (signed char C)
 
raw_ostreamoperator<< (StringRef Str)
 
raw_ostreamoperator<< (const char *Str)
 
raw_ostreamoperator<< (const std::string &Str)
 
raw_ostreamoperator<< (const SmallVectorImpl< char > &Str)
 
raw_ostreamoperator<< (unsigned long N)
 
raw_ostreamoperator<< (long N)
 
raw_ostreamoperator<< (unsigned long long N)
 
raw_ostreamoperator<< (long long N)
 
raw_ostreamoperator<< (const void *P)
 
raw_ostreamoperator<< (unsigned int N)
 
raw_ostreamoperator<< (int N)
 
raw_ostreamoperator<< (double N)
 
raw_ostreamwrite_hex (unsigned long long N)
 Output N in hexadecimal, without any prefix or padding. More...
 
raw_ostreamoperator<< (Colors C)
 
raw_ostreamwrite_uuid (const uuid_t UUID)
 
raw_ostreamwrite_escaped (StringRef Str, bool UseHexEscapes=false)
 Output Str, turning '\', '\t', '
', '"', and anything that doesn't satisfy llvm::isPrint into an escape sequence. More...
 
raw_ostreamwrite (unsigned char C)
 
raw_ostreamwrite (const char *Ptr, size_t Size)
 
raw_ostreamoperator<< (const format_object_base &Fmt)
 
raw_ostreamoperator<< (const FormattedString &)
 
raw_ostreamoperator<< (const FormattedNumber &)
 
raw_ostreamoperator<< (const formatv_object_base &)
 
raw_ostreamoperator<< (const FormattedBytes &)
 
raw_ostreamindent (unsigned NumSpaces)
 indent - Insert 'NumSpaces' spaces. More...
 
raw_ostreamwrite_zeros (unsigned NumZeros)
 write_zeros - Insert 'NumZeros' nulls. More...
 
virtual raw_ostreamchangeColor (enum Colors Color, bool Bold=false, bool BG=false)
 Changes the foreground color of text that will be output from this point forward. More...
 
virtual raw_ostreamresetColor ()
 Resets the colors to terminal defaults. More...
 
virtual raw_ostreamreverseColor ()
 Reverses the foreground and background colors. More...
 
virtual bool is_displayed () const
 This function determines if this stream is connected to a "tty" or "console" window. More...
 
virtual bool has_colors () const
 This function determines if this stream is displayed and supports colors. More...
 
virtual void enable_colors (bool enable)
 
bool colors_enabled () const
 
void tie (raw_ostream *TieTo)
 Tie this stream to the specified stream. More...
 

Static Public Attributes

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

Protected Member Functions

void SetBuffer (char *BufferStart, size_t Size)
 Use the provided buffer as the raw_ostream buffer. More...
 
virtual size_t preferred_buffer_size () const
 Return an efficient buffer size for the underlying output mechanism. More...
 
const char * getBufferStart () const
 Return the beginning of the current stream buffer, or 0 if the stream is unbuffered. More...
 

Detailed Description

This class implements an extremely fast bulk output stream that can only output to a stream.

It does not support seeking, reopening, rewinding, line buffered disciplines etc. It is a simple buffer that outputs a chunk at a time.

Definition at line 53 of file raw_ostream.h.

Member Typedef Documentation

◆ uuid_t

using llvm::raw_ostream::uuid_t = uint8_t[16]

Output a formatted UUID with dash separators.

Definition at line 272 of file raw_ostream.h.

Member Enumeration Documentation

◆ Colors

Enumerator
BLACK 
RED 
GREEN 
YELLOW 
BLUE 
MAGENTA 
CYAN 
WHITE 
SAVEDCOLOR 
RESET 

Definition at line 97 of file raw_ostream.h.

◆ OStreamKind

Enumerator
OK_OStream 
OK_FDStream 

Definition at line 56 of file raw_ostream.h.

Constructor & Destructor Documentation

◆ raw_ostream() [1/2]

llvm::raw_ostream::raw_ostream ( bool  unbuffered = false,
OStreamKind  K = OStreamKind::OK_OStream 
)
inlineexplicit

Definition at line 121 of file raw_ostream.h.

◆ raw_ostream() [2/2]

llvm::raw_ostream::raw_ostream ( const raw_ostream )
delete

◆ ~raw_ostream()

raw_ostream::~raw_ostream ( )
virtual

Definition at line 77 of file raw_ostream.cpp.

References assert().

Member Function Documentation

◆ changeColor()

raw_ostream & raw_ostream::changeColor ( enum Colors  Color,
bool  Bold = false,
bool  BG = false 
)
virtual

Changes the foreground color of text that will be output from this point forward.

Parameters
ColorANSI color to use, the special SAVEDCOLOR can be used to change only the bold attribute, and keep colors untouched
Boldbold/brighter text, default false
BGif true change the background, default: change foreground
Returns
itself so it can be used within << invocations

Reimplemented in llvm::formatted_raw_ostream.

Definition at line 522 of file raw_ostream.cpp.

References llvm::sys::Process::OutputBold(), llvm::sys::Process::OutputColor(), SAVEDCOLOR, and write().

Referenced by llvm::WithColor::changeColor(), llvm::formatted_raw_ostream::changeColor(), operator<<(), and llvm::WithColor::WithColor().

◆ colors_enabled()

bool llvm::raw_ostream::colors_enabled ( ) const
inline

Definition at line 333 of file raw_ostream.h.

◆ enable_colors()

virtual void llvm::raw_ostream::enable_colors ( bool  enable)
inlinevirtual

Definition at line 331 of file raw_ostream.h.

Referenced by llvm::raw_fd_ostream::raw_fd_ostream().

◆ flush()

void llvm::raw_ostream::flush ( )
inline

Definition at line 186 of file raw_ostream.h.

Referenced by llvm::TarWriter::append(), llvm::raw_fd_ostream::close(), computeStringTable(), llvm::gsym::DwarfTransformer::convert(), convertToSinitPriority(), llvm::LTOCodeGenerator::DiagnosticHandler(), llvm::pdb::PDBSymbol::dumpChildStats(), llvm::pdb::PDBSymbol::dumpProperties(), emitComments(), llvm::emitLinkerFlagsForGlobalCOFF(), fail(), llvm::ScopedPrinter::flush(), llvm::json::OStream::flush(), llvm::object::ArchiveMemberHeader::getAccessMode(), llvm::Attribute::getAsString(), getBlockName(), getBranchCondString(), getDebugLocString(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::object::ArchiveMemberHeader::getGID(), llvm::object::ArchiveMemberHeader::getLastModified(), llvm::object::ArchiveMemberHeader::getName(), llvm::LazyCallGraph::SCC::getName(), llvm::LazyCallGraph::RefSCC::getName(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getNodeAttributes(), getShuffleComment(), llvm::object::ArchiveMemberHeader::getSize(), llvm::object::ArchiveMemberHeader::getUID(), llvm::NVPTXAsmPrinter::getVirtualRegisterName(), handleDiagnostic(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::IsSameAsFreshTree(), LLVMGetDiagInfoDescription(), LLVMParseIRInContext(), LLVMPrintModuleToString(), LLVMPrintTypeToString(), LLVMPrintValueToString(), LLVMTargetMachineEmit(), LLVMTargetMachineEmitToFile(), llvm::CodeViewYAML::detail::UnknownSymbolRecord::map(), llvm::MIRPrinter::print(), llvm::DiagnosticInfoUnsupported::print(), PrintCurStackTrace(), llvm::opt::OptTable::printHelp(), llvm::AMDGPUInstPrinter::printInst(), llvm::PrintStatistics(), llvm::PrintStatisticsJSON(), reportError(), reportOpenError(), rescheduleLexographically(), llvm::AMDGPUSimplifyLibCallsPass::run(), llvm::raw_fd_ostream::seek(), llvm::LoopVectorizationCostModel::selectVectorizationFactor(), SetBufferSize(), llvm::setProfMetadata(), SetUnbuffered(), llvm::raw_sha1_ostream::sha1(), llvm::formatv_object_base::str(), llvm::raw_string_ostream::str(), llvm::sys::StrError(), llvm::unittest::TempFile::TempFile(), llvm::AMDGPU::IsaInfo::AMDGPUTargetID::toString(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyDFSNumbers(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::VerifyLevels(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyParentProperty(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyReachability(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyRoots(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifySiblingProperty(), llvm::writeArchiveToStream(), llvm::writeToOutput(), writeToResolutionFile(), llvm::object::writeUniversalBinaryToStream(), llvm::circular_raw_ostream::~circular_raw_ostream(), llvm::gsym::FileWriter::~FileWriter(), llvm::formatted_raw_ostream::~formatted_raw_ostream(), llvm::raw_fd_ostream::~raw_fd_ostream(), llvm::raw_null_ostream::~raw_null_ostream(), llvm::raw_os_ostream::~raw_os_ostream(), and llvm::raw_string_ostream::~raw_string_ostream().

◆ get_kind()

OStreamKind llvm::raw_ostream::get_kind ( ) const
inline

Definition at line 137 of file raw_ostream.h.

Referenced by llvm::raw_fd_stream::classof().

◆ GetBufferSize()

size_t llvm::raw_ostream::GetBufferSize ( ) const
inline

Definition at line 160 of file raw_ostream.h.

References preferred_buffer_size().

◆ getBufferStart()

const char* llvm::raw_ostream::getBufferStart ( ) const
inlineprotected

Return the beginning of the current stream buffer, or 0 if the stream is unbuffered.

Definition at line 376 of file raw_ostream.h.

Referenced by llvm::formatted_raw_ostream::getColumn(), llvm::formatted_raw_ostream::getLine(), llvm::orc::DumpObjects::operator()(), and llvm::formatted_raw_ostream::PadToColumn().

◆ GetNumBytesInBuffer()

size_t llvm::raw_ostream::GetNumBytesInBuffer ( ) const
inline

◆ has_colors()

virtual bool llvm::raw_ostream::has_colors ( ) const
inlinevirtual

This function determines if this stream is displayed and supports colors.

The result is unaffected by calls to enable_color().

Reimplemented in llvm::raw_fd_ostream.

Definition at line 327 of file raw_ostream.h.

References is_displayed().

Referenced by llvm::WithColor::colorsEnabled().

◆ indent()

raw_ostream & raw_ostream::indent ( unsigned  NumSpaces)

indent - Insert 'NumSpaces' spaces.

Definition at line 497 of file raw_ostream.cpp.

Referenced by llvm::IndexedReference::computeRefCost(), llvm::pdb::IPDBSourceFile::dump(), llvm::LexicalScope::dump(), llvm::DWARFDie::dump(), llvm::gsym::GsymReader::dump(), llvm::dwarf::UnwindRow::dump(), llvm::dwarf::CFIProgram::dump(), dumpAttribute(), llvm::DWARFLocationTable::dumpLocationList(), llvm::LPPassManager::dumpPassStructure(), llvm::RGPassManager::dumpPassStructure(), llvm::Pass::dumpPassStructure(), llvm::FPPassManager::dumpPassStructure(), dumpRanges(), llvm::pdb::dumpSymbolField(), llvm::pdb::dumpSymbolIdField(), llvm::DWARFDebugLine::Row::dumpTableHeader(), llvm::StringMatcher::Emit(), llvm::MCPseudoProbe::emit(), llvm::MCPseudoProbeInlineTree::emit(), emitBasicBlockLoopComments(), llvm::detail::PadAdapter< T >::format(), llvm::IndexedReference::hasSpacialReuse(), llvm::gsym::operator<<(), operator<<(), llvm::operator<<(), llvm::formatted_raw_ostream::PadToColumn(), llvm::DWARFDebugLine::LineTable::parse(), llvm::WebAssemblyException::print(), llvm::MIPrinter::print(), llvm::MemoryDepChecker::Dependence::print(), llvm::SCEVEqualPredicate::print(), llvm::SCEVWrapPredicate::print(), llvm::RegionBase< RegionTraits< Function > >::print(), llvm::RuntimePointerChecking::print(), llvm::LoopBase< BasicBlock, Loop >::print(), llvm::LoopAccessInfo::print(), llvm::sampleprof::FunctionSamples::print(), llvm::LoopAccessLegacyAnalysis::print(), llvm::MachineBasicBlock::print(), llvm::slpvectorizer::BoUpSLP::VLOperands::print(), llvm::PredicatedScalarEvolution::print(), llvm::RuntimePointerChecking::printChecks(), PrintChildLoopComment(), llvm::cl::Option::printEnumValHelpStr(), llvm::cl::generic_parser_base::printGenericOptionDiff(), PrintHelpOptionList(), llvm::cl::Option::printHelpStr(), llvm::cl::basic_parser_impl::printOptionName(), PrintParentLoopComment(), llvm::TargetRegistry::printRegisteredTargetsForVersion(), printWithSpacePadding(), and llvm::LoopAccessInfoPrinterPass::run().

◆ is_displayed()

virtual bool llvm::raw_ostream::is_displayed ( ) const
inlinevirtual

This function determines if this stream is connected to a "tty" or "console" window.

That is, the output would be displayed to the user rather than being put on a pipe or stored in a file.

Reimplemented in llvm::raw_fd_ostream, llvm::formatted_raw_ostream, and llvm::circular_raw_ostream.

Definition at line 323 of file raw_ostream.h.

Referenced by llvm::CheckBitcodeOutputToConsole(), has_colors(), llvm::circular_raw_ostream::is_displayed(), and llvm::formatted_raw_ostream::is_displayed().

◆ operator<<() [1/21]

raw_ostream& llvm::raw_ostream::operator<< ( char  C)
inline

Definition at line 191 of file raw_ostream.h.

References write().

Referenced by operator<<().

◆ operator<<() [2/21]

raw_ostream & raw_ostream::operator<< ( Colors  C)

Definition at line 145 of file raw_ostream.cpp.

References changeColor(), RESET, and resetColor().

◆ operator<<() [3/21]

raw_ostream& llvm::raw_ostream::operator<< ( const char *  Str)
inline

Definition at line 227 of file raw_ostream.h.

References operator<<().

◆ operator<<() [4/21]

raw_ostream & raw_ostream::operator<< ( const format_object_base Fmt)

◆ operator<<() [5/21]

raw_ostream & raw_ostream::operator<< ( const FormattedBytes FB)

◆ operator<<() [6/21]

raw_ostream & raw_ostream::operator<< ( const FormattedNumber FN)

◆ operator<<() [7/21]

raw_ostream & raw_ostream::operator<< ( const FormattedString FS)

◆ operator<<() [8/21]

raw_ostream & raw_ostream::operator<< ( const formatv_object_base Obj)

Definition at line 349 of file raw_ostream.cpp.

References llvm::formatv_object_base::format().

◆ operator<<() [9/21]

raw_ostream& llvm::raw_ostream::operator<< ( const SmallVectorImpl< char > &  Str)
inline

Definition at line 245 of file raw_ostream.h.

References write().

◆ operator<<() [10/21]

raw_ostream& llvm::raw_ostream::operator<< ( const std::string &  Str)
inline

Definition at line 234 of file raw_ostream.h.

References write().

◆ operator<<() [11/21]

raw_ostream & raw_ostream::operator<< ( const void *  P)

Definition at line 203 of file raw_ostream.cpp.

References P, llvm::PrefixLower, and llvm::write_hex().

◆ operator<<() [12/21]

raw_ostream & raw_ostream::operator<< ( double  N)

Definition at line 208 of file raw_ostream.cpp.

References llvm::Exponent, N, and llvm::write_double().

◆ operator<<() [13/21]

raw_ostream& llvm::raw_ostream::operator<< ( int  N)
inline

Definition at line 259 of file raw_ostream.h.

References N.

◆ operator<<() [14/21]

raw_ostream & raw_ostream::operator<< ( long long  N)

Definition at line 135 of file raw_ostream.cpp.

References llvm::Integer, N, and llvm::write_integer().

◆ operator<<() [15/21]

raw_ostream & raw_ostream::operator<< ( long  N)

Definition at line 125 of file raw_ostream.cpp.

References llvm::Integer, N, and llvm::write_integer().

◆ operator<<() [16/21]

raw_ostream& llvm::raw_ostream::operator<< ( signed char  C)
inline

Definition at line 205 of file raw_ostream.h.

References write().

◆ operator<<() [17/21]

raw_ostream& llvm::raw_ostream::operator<< ( StringRef  Str)
inline

Definition at line 212 of file raw_ostream.h.

References memcpy(), llvm::Check::Size, and write().

◆ operator<<() [18/21]

raw_ostream& llvm::raw_ostream::operator<< ( unsigned char  C)
inline

Definition at line 198 of file raw_ostream.h.

References write().

◆ operator<<() [19/21]

raw_ostream& llvm::raw_ostream::operator<< ( unsigned int  N)
inline

Definition at line 255 of file raw_ostream.h.

References N.

◆ operator<<() [20/21]

raw_ostream & raw_ostream::operator<< ( unsigned long long  N)

Definition at line 130 of file raw_ostream.cpp.

References llvm::Integer, N, and llvm::write_integer().

◆ operator<<() [21/21]

raw_ostream & raw_ostream::operator<< ( unsigned long  N)

Definition at line 120 of file raw_ostream.cpp.

References llvm::Integer, N, and llvm::write_integer().

◆ operator=()

void llvm::raw_ostream::operator= ( const raw_ostream )
delete

◆ preferred_buffer_size()

size_t raw_ostream::preferred_buffer_size ( ) const
protectedvirtual

Return an efficient buffer size for the underlying output mechanism.

Definition at line 87 of file raw_ostream.cpp.

Referenced by GetBufferSize(), and SetBuffered().

◆ reserveExtraSpace()

virtual void llvm::raw_ostream::reserveExtraSpace ( uint64_t  ExtraSize)
inlinevirtual

If possible, pre-allocate ExtraSize bytes for stream data.

i.e. it extends internal buffers to keep additional ExtraSize bytes. So that the stream could keep at least tell() + ExtraSize bytes without re-allocations. reserveExtraSpace() does not change the size/data of the stream.

Reimplemented in llvm::raw_svector_ostream, and llvm::raw_string_ostream.

Definition at line 148 of file raw_ostream.h.

◆ resetColor()

raw_ostream & raw_ostream::resetColor ( )
virtual

Resets the colors to terminal defaults.

Call this when you are done outputting colored text, or before program exit.

Reimplemented in llvm::formatted_raw_ostream.

Definition at line 535 of file raw_ostream.cpp.

References llvm::sys::Process::ResetColor(), and write().

Referenced by operator<<(), llvm::WithColor::resetColor(), and llvm::formatted_raw_ostream::resetColor().

◆ reverseColor()

raw_ostream & raw_ostream::reverseColor ( )
virtual

Reverses the foreground and background colors.

Reimplemented in llvm::formatted_raw_ostream.

Definition at line 544 of file raw_ostream.cpp.

References llvm::sys::Process::OutputReverse(), and write().

Referenced by llvm::formatted_raw_ostream::reverseColor().

◆ SetBuffer()

void llvm::raw_ostream::SetBuffer ( char *  BufferStart,
size_t  Size 
)
inlineprotected

Use the provided buffer as the raw_ostream buffer.

This is intended for use only by subclasses which can arrange for the output to go directly into the desired output buffer, instead of being copied on each flush.

Definition at line 367 of file raw_ostream.h.

References llvm::Check::Size.

◆ SetBuffered()

void raw_ostream::SetBuffered ( )

Set the stream to be buffered, with an automatically determined buffer size.

Definition at line 92 of file raw_ostream.cpp.

References preferred_buffer_size(), SetBufferSize(), SetUnbuffered(), and llvm::Check::Size.

Referenced by write().

◆ SetBufferSize()

void llvm::raw_ostream::SetBufferSize ( size_t  Size)
inline

Set the stream to be buffered, using the specified buffer size.

Definition at line 155 of file raw_ostream.h.

References flush(), and llvm::Check::Size.

Referenced by SetBuffered().

◆ SetUnbuffered()

void llvm::raw_ostream::SetUnbuffered ( )
inline

Set the stream to be unbuffered.

When unbuffered, the stream will flush after every write. This routine will also flush the buffer immediately when the stream is being set to unbuffered.

Definition at line 173 of file raw_ostream.h.

References flush().

Referenced by llvm::raw_string_ostream::raw_string_ostream(), llvm::raw_svector_ostream::raw_svector_ostream(), and SetBuffered().

◆ tell()

uint64_t llvm::raw_ostream::tell ( ) const
inline

◆ tie()

void llvm::raw_ostream::tie ( raw_ostream TieTo)
inline

Tie this stream to the specified stream.

Replaces any existing tied-to stream. Specifying a nullptr unties the stream.

Definition at line 337 of file raw_ostream.h.

◆ write() [1/2]

raw_ostream & raw_ostream::write ( const char *  Ptr,
size_t  Size 
)

Definition at line 240 of file raw_ostream.cpp.

References assert(), LLVM_UNLIKELY, SetBuffered(), llvm::Check::Size, and write().

◆ write() [2/2]

raw_ostream & raw_ostream::write ( unsigned char  C)

Definition at line 220 of file raw_ostream.cpp.

References LLVM_UNLIKELY, and SetBuffered().

Referenced by changeColor(), llvm::InstrProfRecordWriterTrait::EmitData(), llvm::DWARFYAML::emitDebugAbbrev(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugStr(), emitExternalFile(), emitFileEntry(), EmitGCCInlineAsmStr(), llvm::InstrProfRecordWriterTrait::EmitKey(), emitMagic(), EmitMSInlineAsmStr(), emitStrTab(), emitVersion(), llvm::circular_raw_ostream::flushBufferWithBanner(), llvm::remarks::BitstreamRemarkSerializerHelper::flushToStream(), llvm::DWARFYAML::Data::getAbbrevTableContentByIndex(), llvm::orc::DumpObjects::operator()(), operator<<(), operator<<(), printBSDMemberHeader(), resetColor(), reverseColor(), llvm::remarks::StringTable::serialize(), llvm::support::endian::write(), llvm::msgpack::Writer::write(), write(), write_padding(), writeArrayData(), llvm::yaml::BinaryRef::writeAsBinary(), llvm::yaml::BinaryRef::writeAsHex(), llvm::WriteBitcodeToFile(), writeCOFF(), llvm::gsym::FileWriter::writeData(), llvm::msgpack::Writer::writeExt(), writeExtendedOpcode(), llvm::writeFileAtomically(), llvm::WriteIndexToFile(), writeInteger(), llvm::CSKYAsmBackend::writeNopData(), llvm::ARMAsmBackend::writeNopData(), llvm::RISCVAsmBackend::writeNopData(), llvm::gsym::FileWriter::writeSLEB(), writeSymbolTable(), llvm::WriteThinLinkBitcodeToFile(), llvm::gsym::FileWriter::writeU16(), llvm::gsym::FileWriter::writeU32(), llvm::gsym::FileWriter::writeU64(), llvm::gsym::FileWriter::writeU8(), writeUint32(), writeUint64(), writeUint8(), llvm::gsym::FileWriter::writeULEB(), llvm::object::writeUniversalBinaryToStream(), llvm::yaml::yaml2archive(), and ZeroFillBytes().

◆ write_escaped()

raw_ostream & raw_ostream::write_escaped ( StringRef  Str,
bool  UseHexEscapes = false 
)

◆ write_hex()

raw_ostream & raw_ostream::write_hex ( unsigned long long  N)

Output N in hexadecimal, without any prefix or padding.

Definition at line 140 of file raw_ostream.cpp.

References llvm::Lower, N, and llvm::write_hex().

Referenced by dumpDataAux(), printExpr(), printHex32(), and llvm::HexagonShuffler::shuffle().

◆ write_uuid()

raw_ostream & raw_ostream::write_uuid ( const uuid_t  UUID)

Definition at line 153 of file raw_ostream.cpp.

References llvm::format().

Referenced by dumpUUID(), and llvm::yaml::ScalarTraits< uuid_t >::output().

◆ write_zeros()

raw_ostream & raw_ostream::write_zeros ( unsigned  NumZeros)

Member Data Documentation

◆ BLACK

constexpr raw_ostream::Colors raw_ostream::BLACK = Colors::BLACK
staticconstexpr

Definition at line 110 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().

◆ BLUE

constexpr raw_ostream::Colors raw_ostream::BLUE = Colors::BLUE
staticconstexpr

Definition at line 114 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().

◆ CYAN

constexpr raw_ostream::Colors raw_ostream::CYAN = Colors::CYAN
staticconstexpr

Definition at line 116 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().

◆ GREEN

constexpr raw_ostream::Colors raw_ostream::GREEN = Colors::GREEN
staticconstexpr

Definition at line 112 of file raw_ostream.h.

Referenced by llvm::SMDiagnostic::print(), and llvm::WithColor::WithColor().

◆ MAGENTA

constexpr raw_ostream::Colors raw_ostream::MAGENTA = Colors::MAGENTA
staticconstexpr

Definition at line 115 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().

◆ RED

constexpr raw_ostream::Colors raw_ostream::RED = Colors::RED
staticconstexpr

Definition at line 111 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().

◆ RESET

constexpr raw_ostream::Colors raw_ostream::RESET = Colors::RESET
staticconstexpr

Definition at line 119 of file raw_ostream.h.

◆ SAVEDCOLOR

constexpr raw_ostream::Colors raw_ostream::SAVEDCOLOR = Colors::SAVEDCOLOR
staticconstexpr

Definition at line 118 of file raw_ostream.h.

Referenced by changeColor(), and llvm::SMDiagnostic::print().

◆ WHITE

constexpr raw_ostream::Colors raw_ostream::WHITE = Colors::WHITE
staticconstexpr

Definition at line 117 of file raw_ostream.h.

◆ YELLOW

constexpr raw_ostream::Colors raw_ostream::YELLOW = Colors::YELLOW
staticconstexpr

Definition at line 113 of file raw_ostream.h.

Referenced by llvm::WithColor::WithColor().


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