LLVM 20.0.0git
|
This class implements an extremely fast bulk output stream that can only output to a stream. More...
#include "llvm/Support/raw_ostream.h"
Public Types | |
enum class | OStreamKind { OK_OStream , OK_FDStream , OK_SVecStream } |
enum class | Colors { BLACK = 0 , RED , GREEN , YELLOW , BLUE , MAGENTA , CYAN , WHITE , BRIGHT_BLACK , BRIGHT_RED , BRIGHT_GREEN , BRIGHT_YELLOW , BRIGHT_BLUE , BRIGHT_MAGENTA , BRIGHT_CYAN , BRIGHT_WHITE , SAVEDCOLOR , RESET } |
using | uuid_t = uint8_t[16] |
Output a formatted UUID with dash separators. | |
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. | |
OStreamKind | get_kind () const |
virtual void | reserveExtraSpace (uint64_t ExtraSize) |
If possible, pre-allocate ExtraSize bytes for stream data. | |
void | SetBuffered () |
Set the stream to be buffered, with an automatically determined buffer size. | |
void | SetBufferSize (size_t Size) |
Set the stream to be buffered, using the specified buffer size. | |
size_t | GetBufferSize () const |
void | SetUnbuffered () |
Set the stream to be unbuffered. | |
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<< (const std::string_view &Str) |
raw_ostream & | operator<< (const SmallVectorImpl< char > &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) |
Output N in hexadecimal, without any prefix or padding. | |
raw_ostream & | operator<< (Colors C) |
raw_ostream & | write_uuid (const uuid_t UUID) |
raw_ostream & | write_escaped (StringRef Str, bool UseHexEscapes=false) |
Output Str , turning '\', '\t', '', '"', and anything that doesn't satisfy llvm::isPrint into an escape sequence. | |
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 & | operator<< (const FormattedString &) |
raw_ostream & | operator<< (const FormattedNumber &) |
raw_ostream & | operator<< (const formatv_object_base &) |
raw_ostream & | operator<< (const FormattedBytes &) |
raw_ostream & | indent (unsigned NumSpaces) |
indent - Insert 'NumSpaces' spaces. | |
raw_ostream & | write_zeros (unsigned NumZeros) |
write_zeros - Insert 'NumZeros' nulls. | |
virtual raw_ostream & | changeColor (enum Colors Color, bool Bold=false, bool BG=false) |
Changes the foreground color of text that will be output from this point forward. | |
virtual raw_ostream & | resetColor () |
Resets the colors to terminal defaults. | |
virtual raw_ostream & | reverseColor () |
Reverses the foreground and background colors. | |
virtual bool | is_displayed () const |
This function determines if this stream is connected to a "tty" or "console" window. | |
virtual bool | has_colors () const |
This function determines if this stream is displayed and supports colors. | |
virtual void | enable_colors (bool enable) |
bool | colors_enabled () const |
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 | BRIGHT_BLACK = Colors::BRIGHT_BLACK |
static constexpr Colors | BRIGHT_RED = Colors::BRIGHT_RED |
static constexpr Colors | BRIGHT_GREEN = Colors::BRIGHT_GREEN |
static constexpr Colors | BRIGHT_YELLOW = Colors::BRIGHT_YELLOW |
static constexpr Colors | BRIGHT_BLUE = Colors::BRIGHT_BLUE |
static constexpr Colors | BRIGHT_MAGENTA = Colors::BRIGHT_MAGENTA |
static constexpr Colors | BRIGHT_CYAN = Colors::BRIGHT_CYAN |
static constexpr Colors | BRIGHT_WHITE = Colors::BRIGHT_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. | |
virtual size_t | preferred_buffer_size () const |
Return an efficient buffer size for the underlying output mechanism. | |
const char * | getBufferStart () const |
Return the beginning of the current stream buffer, or 0 if the stream is unbuffered. | |
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 52 of file raw_ostream.h.
using llvm::raw_ostream::uuid_t = uint8_t[16] |
Output a formatted UUID with dash separators.
Definition at line 296 of file raw_ostream.h.
|
strong |
Enumerator | |
---|---|
BLACK | |
RED | |
GREEN | |
YELLOW | |
BLUE | |
MAGENTA | |
CYAN | |
WHITE | |
BRIGHT_BLACK | |
BRIGHT_RED | |
BRIGHT_GREEN | |
BRIGHT_YELLOW | |
BRIGHT_BLUE | |
BRIGHT_MAGENTA | |
BRIGHT_CYAN | |
BRIGHT_WHITE | |
SAVEDCOLOR | |
RESET |
Definition at line 93 of file raw_ostream.h.
|
strong |
Enumerator | |
---|---|
OK_OStream | |
OK_FDStream | |
OK_SVecStream |
Definition at line 55 of file raw_ostream.h.
|
inlineexplicit |
Definition at line 133 of file raw_ostream.h.
|
delete |
|
virtual |
Definition at line 77 of file raw_ostream.cpp.
References assert().
|
virtual |
Changes the foreground color of text that will be output from this point forward.
Color | ANSI color to use, the special SAVEDCOLOR can be used to change only the bold attribute, and keep colors untouched |
Bold | bold/brighter text, default false |
BG | if true change the background, default: change foreground |
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::formatted_raw_ostream::changeColor(), llvm::WithColor::changeColor(), operator<<(), llvm::WithColor::WithColor(), and llvm::MCInstPrinter::WithMarkup::WithMarkup().
|
inline |
Definition at line 357 of file raw_ostream.h.
Referenced by llvm::formatted_raw_ostream::changeColor(), llvm::formatted_raw_ostream::resetColor(), and llvm::formatted_raw_ostream::reverseColor().
|
inlinevirtual |
Definition at line 355 of file raw_ostream.h.
Referenced by llvm::raw_fd_ostream::raw_fd_ostream().
|
inline |
Definition at line 198 of file raw_ostream.h.
Referenced by llvm::TarWriter::append(), llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), llvm::raw_fd_ostream::close(), computeMemberData(), computeStringTable(), llvm::gsym::DwarfTransformer::convert(), convertToSinitPriority(), llvm::RISCVInstrInfo::createMIROperandComment(), llvm::LTOCodeGenerator::DiagnosticHandler(), llvm::ImportedFunctionsInliningStatistics::dump(), llvm::pdb::PDBSymbol::dumpChildStats(), llvm::pdb::PDBSymbol::dumpProperties(), emitComments(), emitDebugSectionImpl(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::LoopVectorizationPlanner::emitInvalidCostRemarks(), llvm::emitLinkerFlagsForGlobalCOFF(), flattenCommandLine(), llvm::json::OStream::flush(), llvm::ScopedPrinter::flush(), llvm::UnOpInit::Fold(), llvm::format(), llvm::Attribute::getAsString(), getBlockName(), getBranchCondString(), llvm::object::ArchiveMemberHeader::getName(), getShuffleComment(), llvm::NVPTXAsmPrinter::getVirtualRegisterName(), handleDiagnostic(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::IsSameAsFreshTree(), LLVMGetDiagInfoDescription(), LLVMParseIRInContext(), LLVMPrintDbgRecordToString(), LLVMPrintModuleToString(), LLVMPrintTypeToString(), LLVMPrintValueToString(), LLVMTargetMachineEmit(), LLVMTargetMachineEmitToFile(), llvm::CodeViewYAML::detail::UnknownSymbolRecord::map(), llvm::MIRPrinter::print(), llvm::DiagnosticInfoUnsupported::print(), llvm::PrintStatistics(), llvm::PrintStatisticsJSON(), reportError(), reportOpenError(), rescheduleLexographically(), llvm::raw_fd_ostream::seek(), SetBufferSize(), llvm::setProfMetadata(), SetUnbuffered(), llvm::raw_sha1_ostream::sha1(), shortBundleName(), llvm::formatv_object_base::str(), 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(), writeUniversalArchsToStream(), 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(), and llvm::raw_os_ostream::~raw_os_ostream().
|
inline |
Definition at line 149 of file raw_ostream.h.
Referenced by llvm::raw_fd_stream::classof(), and llvm::raw_svector_ostream::classof().
|
inline |
Definition at line 172 of file raw_ostream.h.
References preferred_buffer_size().
Return the beginning of the current stream buffer, or 0 if the stream is unbuffered.
Definition at line 396 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().
|
inline |
Definition at line 190 of file raw_ostream.h.
Referenced by llvm::formatted_raw_ostream::getColumn(), llvm::formatted_raw_ostream::getLine(), llvm::formatted_raw_ostream::PadToColumn(), and tell().
|
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 351 of file raw_ostream.h.
References is_displayed().
Referenced by DefaultAutoDetectFunction().
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::RegionBase< RegionTraits< MachineFunction > >::contains(), llvm::gsym::GsymReader::dump(), llvm::dwarf::CFIProgram::dump(), llvm::dwarf::UnwindRow::dump(), llvm::pdb::IPDBSourceFile::dump(), llvm::DWARFDie::dump(), llvm::LexicalScope::dump(), dumpAttribute(), llvm::DWARFLocationTable::dumpLocationList(), DumpNodes(), DumpNodesr(), llvm::LPPassManager::dumpPassStructure(), llvm::RGPassManager::dumpPassStructure(), llvm::FPPassManager::dumpPassStructure(), llvm::Pass::dumpPassStructure(), dumpRanges(), llvm::DWARFDebugLoc::dumpRawEntry(), llvm::DWARFDebugLoclists::dumpRawEntry(), llvm::pdb::dumpSymbolIdField(), llvm::DWARFDebugLine::Row::dumpTableHeader(), llvm::MCPseudoProbeInlineTree::emit(), llvm::MCPseudoProbe::emit(), llvm::StringMatcher::Emit(), emitBasicBlockLoopComments(), llvm::support::detail::PadAdapter< T >::format(), llvm::IndexedReference::hasSpacialReuse(), llvm::dwarf_linker::parallel::DWARFLinkerImpl::LinkContext::isClangModuleRef(), llvm::pdb::LinePrinter::NewLine(), operator<<(), llvm::operator<<(), llvm::gsym::operator<<(), llvm::formatted_raw_ostream::PadToColumn(), llvm::DWARFDebugLine::LineTable::parse(), llvm::MIPrinter::print(), llvm::slpvectorizer::BoUpSLP::VLOperands::print(), llvm::RegionBase< Tr >::print(), llvm::LoopBase< BlockT, LoopT >::print(), llvm::MachineBasicBlock::print(), llvm::PredicatedScalarEvolution::print(), llvm::MemoryDepChecker::Dependence::print(), llvm::RuntimePointerChecking::print(), llvm::LoopAccessInfo::print(), llvm::WebAssemblyException::print(), llvm::SCEVComparePredicate::print(), llvm::SCEVWrapPredicate::print(), llvm::sampleprof::FunctionSamples::print(), llvm::RuntimePointerChecking::printChecks(), PrintChildLoopComment(), llvm::cl::Option::printEnumValHelpStr(), PrintExtension(), llvm::cl::generic_parser_base::printGenericOptionDiff(), PrintHelpOptionList(), llvm::cl::Option::printHelpStr(), llvm::cl::basic_parser_impl::printOptionName(), PrintParentLoopComment(), llvm::TargetRegistry::printRegisteredTargetsForVersion(), printrWithDepthHelper(), llvm::RISCVISAInfo::printSupportedExtensions(), printWithSpacePadding(), llvm::LoopAccessInfoPrinterPass::run(), and llvm::sampleprof::SampleProfileWriterText::writeSample().
|
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::circular_raw_ostream, llvm::formatted_raw_ostream, and llvm::raw_fd_ostream.
Definition at line 347 of file raw_ostream.h.
Referenced by llvm::CheckBitcodeOutputToConsole(), has_colors(), llvm::circular_raw_ostream::is_displayed(), and llvm::formatted_raw_ostream::is_displayed().
|
inline |
Definition at line 203 of file raw_ostream.h.
References llvm::CallingConv::C, and write().
Referenced by operator<<().
raw_ostream & raw_ostream::operator<< | ( | Colors | C | ) |
Definition at line 152 of file raw_ostream.cpp.
References llvm::CallingConv::C, changeColor(), RESET, and resetColor().
|
inline |
Definition at line 253 of file raw_ostream.h.
References operator<<().
raw_ostream & raw_ostream::operator<< | ( | const format_object_base & | Fmt | ) |
Definition at line 310 of file raw_ostream.cpp.
References assert(), llvm::format_object_base::print(), and write().
raw_ostream & raw_ostream::operator<< | ( | const FormattedBytes & | FB | ) |
Definition at line 404 of file raw_ostream.cpp.
References llvm::alignTo(), assert(), llvm::ArrayRef< T >::empty(), I, indent(), llvm::Log2_64_Ceil(), llvm::Lower, llvm::Offset, Size, llvm::Upper, and llvm::write_hex().
raw_ostream & raw_ostream::operator<< | ( | const FormattedNumber & | FN | ) |
Definition at line 381 of file raw_ostream.cpp.
References indent(), llvm::Integer, llvm::Lower, llvm::PrefixLower, llvm::PrefixUpper, llvm::SmallVectorBase< Size_T >::size(), llvm::Upper, llvm::write_hex(), and llvm::write_integer().
raw_ostream & raw_ostream::operator<< | ( | const FormattedString & | FS | ) |
Definition at line 355 of file raw_ostream.cpp.
References indent(), llvm::FormattedString::JustifyCenter, llvm::FormattedString::JustifyLeft, llvm::FormattedString::JustifyNone, and llvm::FormattedString::JustifyRight.
raw_ostream & raw_ostream::operator<< | ( | const formatv_object_base & | Obj | ) |
Definition at line 350 of file raw_ostream.cpp.
References llvm::formatv_object_base::format().
|
inline |
Definition at line 269 of file raw_ostream.h.
References write().
|
inline |
Definition at line 260 of file raw_ostream.h.
References write().
|
inline |
Definition at line 265 of file raw_ostream.h.
References write().
raw_ostream & raw_ostream::operator<< | ( | const void * | P | ) |
Definition at line 210 of file raw_ostream.cpp.
References P, llvm::PrefixLower, and llvm::write_hex().
raw_ostream & raw_ostream::operator<< | ( | double | N | ) |
Definition at line 215 of file raw_ostream.cpp.
References llvm::Exponent, N, and llvm::write_double().
|
inline |
Definition at line 283 of file raw_ostream.h.
References N.
raw_ostream & raw_ostream::operator<< | ( | long long | N | ) |
Definition at line 142 of file raw_ostream.cpp.
References llvm::Integer, N, and llvm::write_integer().
raw_ostream & raw_ostream::operator<< | ( | long | N | ) |
Definition at line 132 of file raw_ostream.cpp.
References llvm::Integer, N, and llvm::write_integer().
|
inline |
Definition at line 217 of file raw_ostream.h.
References llvm::CallingConv::C, and write().
|
inline |
Definition at line 224 of file raw_ostream.h.
|
inline |
Definition at line 210 of file raw_ostream.h.
References llvm::CallingConv::C, and write().
|
inline |
Definition at line 279 of file raw_ostream.h.
References N.
raw_ostream & raw_ostream::operator<< | ( | unsigned long long | N | ) |
Definition at line 137 of file raw_ostream.cpp.
References llvm::Integer, N, and llvm::write_integer().
raw_ostream & raw_ostream::operator<< | ( | unsigned long | N | ) |
Definition at line 127 of file raw_ostream.cpp.
References llvm::Integer, N, and llvm::write_integer().
|
delete |
|
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().
|
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_string_ostream, and llvm::raw_svector_ostream.
Definition at line 160 of file raw_ostream.h.
Referenced by llvm::objcopy::wasm::Writer::write().
|
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(), llvm::formatted_raw_ostream::resetColor(), llvm::pdb::WithColor::~WithColor(), and llvm::MCInstPrinter::WithMarkup::~WithMarkup().
|
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().
|
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 387 of file raw_ostream.h.
References Size.
void raw_ostream::SetBuffered | ( | ) |
Set the stream to be buffered, with an automatically determined buffer size.
Definition at line 99 of file raw_ostream.cpp.
References preferred_buffer_size(), SetBufferSize(), SetUnbuffered(), and Size.
Referenced by write().
|
inline |
Set the stream to be buffered, using the specified buffer size.
Definition at line 167 of file raw_ostream.h.
Referenced by SetBuffered().
|
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 185 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().
|
inline |
tell - Return the current offset with the file.
Definition at line 147 of file raw_ostream.h.
References GetNumBytesInBuffer().
Referenced by llvm::gsym::FileWriter::alignTo(), llvm::TarWriter::append(), llvm::BitstreamWriter::BackpatchByte(), llvm::dwarf_linker::parallel::DWARFLinkerImpl::LinkContext::cloneAndEmitDebugFrame(), computeMemberData(), llvm::dwarf_linker::parallel::DebugLineSectionEmitter::emit(), llvm::OnDiskChainedHashTableGenerator< Info >::Emit(), llvm::DWARFYAML::emitDebugRanges(), llvm::dwarf_linker::parallel::DwarfUnit::emitDebugStringOffsetSection(), llvm::dwarf_linker::parallel::DwarfUnit::emitPubAcceleratorEntry(), llvm::dwarf_linker::parallel::SectionDescriptor::emitString(), getSymbols(), pad(), llvm::CGDataOStream::patch(), llvm::ProfOStream::patch(), printLine(), printWithSpacePadding(), llvm::raw_pwrite_stream::pwrite(), llvm::LoongArchAsmBackend::relaxDwarfLineAddr(), llvm::RISCVAsmBackend::relaxDwarfLineAddr(), llvm::raw_string_ostream::reserveExtraSpace(), llvm::raw_svector_ostream::reserveExtraSpace(), llvm::CGDataOStream::tell(), llvm::gsym::FileWriter::tell(), llvm::ProfOStream::tell(), llvm::object::OffloadBinary::write(), llvm::coverage::TestingFormatWriter::write(), writeCOFF(), writeDIE(), writeDWARFExpression(), writeDWARFLists(), llvm::MachObjectWriter::writeDysymtabLoadCommand(), writeFragment(), llvm::MachObjectWriter::writeHeader(), llvm::MachObjectWriter::writeLinkeditLoadCommand(), llvm::MachObjectWriter::writeLinkerOptionsLoadCommand(), writeListEntry(), writeMemProfV0(), writeMemProfV1(), writeMemProfV2(), writeMemProfV3(), llvm::WinCOFFWriter::writeObject(), llvm::MachObjectWriter::writeObject(), llvm::MachObjectWriter::writeSection(), llvm::MCAssembler::writeSectionData(), llvm::MachObjectWriter::writeSegmentLoadCommand(), writeSymbolTableHeader(), and llvm::MachObjectWriter::writeSymtabLoadCommand().
raw_ostream & raw_ostream::write | ( | const char * | Ptr, |
size_t | Size | ||
) |
Definition at line 247 of file raw_ostream.cpp.
References assert(), LLVM_UNLIKELY, Ptr, SetBuffered(), Size, and write().
raw_ostream & raw_ostream::write | ( | unsigned char | C | ) |
Definition at line 227 of file raw_ostream.cpp.
References llvm::CallingConv::C, LLVM_UNLIKELY, SetBuffered(), and write().
Referenced by llvm::BitstreamWriter::BackpatchByte(), changeColor(), llvm::dwarf_linker::parallel::SectionDescriptor::emitBinaryData(), llvm::InstrProfRecordWriterTrait::EmitData(), llvm::DWARFYAML::emitDebugAbbrev(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::DWARFYAML::emitDebugNames(), llvm::DWARFYAML::emitDebugStr(), emitExternalFile(), emitFileEntry(), EmitInlineAsmStr(), llvm::dwarf_linker::parallel::SectionDescriptor::emitIntVal(), llvm::InstrProfRecordWriterTrait::EmitKey(), emitMagic(), emitPubSection(), emitStrTab(), emitVersion(), llvm::circular_raw_ostream::flushBufferWithBanner(), llvm::remarks::BitstreamRemarkSerializerHelper::flushToStream(), llvm::DWARFYAML::Data::getAbbrevTableContentByIndex(), llvm::orc::DumpObjects::operator()(), operator<<(), operator<<(), llvm::PGOCtxProfileWriter::PGOCtxProfileWriter(), printBigArchiveMemberHeader(), printBSDMemberHeader(), resetColor(), reverseColor(), llvm::remarks::StringTable::serialize(), llvm::objcopy::wasm::Writer::write(), llvm::objcopy::xcoff::XCOFFWriter::write(), llvm::objcopy::elf::BinaryWriter::write(), llvm::objcopy::elf::IHexWriter::write(), llvm::objcopy::elf::SRECWriter::write(), llvm::msgpack::Writer::write(), llvm::mcdxbc::Signature::write(), llvm::coverage::TestingFormatWriter::write(), llvm::mcdxbc::PSVRuntimeInfo::write(), llvm::support::endian::write(), write(), llvm::support::endian::write_array(), llvm::write_hex(), write_padding(), write_unsigned_impl(), writeArrayData(), llvm::yaml::BinaryRef::writeAsBinary(), llvm::yaml::BinaryRef::writeAsHex(), llvm::WriteBitcodeToFile(), writeCOFF(), llvm::gsym::FileWriter::writeData(), writeDIE(), writeDWARFLists(), llvm::dxil::WriteDXILToFile(), writeECSymbols(), llvm::msgpack::Writer::writeExt(), writeExtendedOpcode(), writeFragment(), llvm::writeIndexToFile(), writeInteger(), writeListEntry(), writeLoadConfig(), writeMemProfSchema(), writeMemProfV0(), writeMemProfV1(), writeMemProfV2(), writeMemProfV3(), llvm::ARMAsmBackend::writeNopData(), llvm::LoongArchAsmBackend::writeNopData(), llvm::RISCVAsmBackend::writeNopData(), llvm::XtensaMCAsmBackend::writeNopData(), llvm::gsym::FileWriter::writeSLEB(), writeSymbolMap(), 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(), writeUniversalArchsToStream(), writeWithCommas(), llvm::yaml::yaml2archive(), llvm::yaml::yaml2offload(), and ZeroFillBytes().
raw_ostream & raw_ostream::write_escaped | ( | StringRef | Str, |
bool | UseHexEscapes = false |
||
) |
Output Str
, turning '\', '\t', '
', '"', and anything that doesn't satisfy llvm::isPrint into an escape sequence.
Definition at line 170 of file raw_ostream.cpp.
Referenced by llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), llvm::AsmToken::dump(), llvm::DWARFContext::dump(), llvm::DWARFFormValue::dump(), llvm::StringToOffsetTable::EmitString(), llvm::object::ArchiveMemberHeader::getName(), llvm::PrettyStackTraceProgram::print(), llvm::Pattern::printSubstitutions(), llvm::MCExternalSymbolizer::tryAddingPcLoadReferenceComment(), and llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand().
raw_ostream & raw_ostream::write_hex | ( | unsigned long long | N | ) |
Output N
in hexadecimal, without any prefix or padding.
Definition at line 147 of file raw_ostream.cpp.
References llvm::Lower, N, and llvm::write_hex().
Referenced by dumpDataAux(), printExpr(), printHex32(), llvm::HexagonShuffler::shuffle(), and llvm::InstrProfWriter::writeRecordInText().
raw_ostream & raw_ostream::write_uuid | ( | const uuid_t | UUID | ) |
Definition at line 160 of file raw_ostream.cpp.
References llvm::format(), and Idx.
Referenced by dumpUUID(), and llvm::yaml::ScalarTraits< uuid_t >::output().
raw_ostream & raw_ostream::write_zeros | ( | unsigned | NumZeros | ) |
write_zeros - Insert 'NumZeros' nulls.
Definition at line 502 of file raw_ostream.cpp.
Referenced by llvm::gsym::FileWriter::alignTo(), llvm::DWARFYAML::Data::getAbbrevTableContentByIndex(), llvm::LoongArchAsmBackend::relaxDwarfLineAddr(), llvm::RISCVAsmBackend::relaxDwarfLineAddr(), llvm::object::OffloadBinary::write(), writeCOFF(), llvm::MachObjectWriter::writeLinkerOptionsLoadCommand(), writeLoadConfig(), llvm::CSKYAsmBackend::writeNopData(), llvm::LoongArchAsmBackend::writeNopData(), llvm::MipsAsmBackend::writeNopData(), llvm::MachObjectWriter::writeObject(), and writeUniversalArchsToStream().
|
staticconstexpr |
Definition at line 114 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor().
|
staticconstexpr |
Definition at line 118 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor().
|
staticconstexpr |
Definition at line 122 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 126 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 128 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 124 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 127 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 123 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 129 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 125 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 120 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor(), and llvm::MCInstPrinter::WithMarkup::WithMarkup().
|
staticconstexpr |
Definition at line 116 of file raw_ostream.h.
Referenced by llvm::SMDiagnostic::print(), llvm::WithColor::WithColor(), and llvm::MCInstPrinter::WithMarkup::WithMarkup().
|
staticconstexpr |
Definition at line 119 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor().
|
staticconstexpr |
Definition at line 115 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor(), and llvm::MCInstPrinter::WithMarkup::WithMarkup().
|
staticconstexpr |
Definition at line 131 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 130 of file raw_ostream.h.
Referenced by changeColor(), and llvm::SMDiagnostic::print().
|
staticconstexpr |
Definition at line 121 of file raw_ostream.h.
|
staticconstexpr |
Definition at line 117 of file raw_ostream.h.
Referenced by llvm::WithColor::WithColor(), and llvm::MCInstPrinter::WithMarkup::WithMarkup().