LLVM 17.0.0git
|
#include "llvm/Support/ScopedPrinter.h"
Public Types | |
enum class | ScopedPrinterKind { Base , JSON } |
Public Member Functions | |
ScopedPrinter (raw_ostream &OS, ScopedPrinterKind Kind=ScopedPrinterKind::Base) | |
ScopedPrinterKind | getKind () const |
virtual | ~ScopedPrinter ()=default |
void | flush () |
void | indent (int Levels=1) |
void | unindent (int Levels=1) |
void | resetIndent () |
int | getIndentLevel () |
void | setPrefix (StringRef P) |
void | printIndent () |
template<typename T > | |
HexNumber | hex (T Value) |
template<typename T , typename TEnum > | |
void | printEnum (StringRef Label, T Value, ArrayRef< EnumEntry< TEnum > > EnumValues) |
template<typename T , typename TFlag > | |
void | printFlags (StringRef Label, T Value, ArrayRef< EnumEntry< TFlag > > Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={}) |
template<typename T > | |
void | printFlags (StringRef Label, T Value) |
virtual void | printNumber (StringRef Label, uint64_t Value) |
virtual void | printNumber (StringRef Label, uint32_t Value) |
virtual void | printNumber (StringRef Label, uint16_t Value) |
virtual void | printNumber (StringRef Label, uint8_t Value) |
virtual void | printNumber (StringRef Label, int64_t Value) |
virtual void | printNumber (StringRef Label, int32_t Value) |
virtual void | printNumber (StringRef Label, int16_t Value) |
virtual void | printNumber (StringRef Label, int8_t Value) |
virtual void | printNumber (StringRef Label, const APSInt &Value) |
virtual void | printNumber (StringRef Label, float Value) |
virtual void | printNumber (StringRef Label, double Value) |
template<typename T > | |
void | printNumber (StringRef Label, StringRef Str, T Value) |
virtual void | printBoolean (StringRef Label, bool Value) |
template<typename... T> | |
void | printVersion (StringRef Label, T... Version) |
template<typename T > | |
void | printList (StringRef Label, const ArrayRef< T > List) |
virtual void | printList (StringRef Label, const ArrayRef< bool > List) |
virtual void | printList (StringRef Label, const ArrayRef< std::string > List) |
virtual void | printList (StringRef Label, const ArrayRef< uint64_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< uint32_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< uint16_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< uint8_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< int64_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< int32_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< int16_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< int8_t > List) |
virtual void | printList (StringRef Label, const ArrayRef< APSInt > List) |
template<typename T , typename U > | |
void | printList (StringRef Label, const T &List, const U &Printer) |
template<typename T > | |
void | printHexList (StringRef Label, const T &List) |
template<typename T > | |
void | printHex (StringRef Label, T Value) |
template<typename T > | |
void | printHex (StringRef Label, StringRef Str, T Value) |
template<typename T > | |
void | printSymbolOffset (StringRef Label, StringRef Symbol, T Value) |
virtual void | printString (StringRef Value) |
virtual void | printString (StringRef Label, StringRef Value) |
void | printStringEscaped (StringRef Label, StringRef Value) |
void | printBinary (StringRef Label, StringRef Str, ArrayRef< uint8_t > Value) |
void | printBinary (StringRef Label, StringRef Str, ArrayRef< char > Value) |
void | printBinary (StringRef Label, ArrayRef< uint8_t > Value) |
void | printBinary (StringRef Label, ArrayRef< char > Value) |
void | printBinary (StringRef Label, StringRef Value) |
void | printBinaryBlock (StringRef Label, ArrayRef< uint8_t > Value, uint32_t StartOffset) |
void | printBinaryBlock (StringRef Label, ArrayRef< uint8_t > Value) |
void | printBinaryBlock (StringRef Label, StringRef Value) |
template<typename T > | |
void | printObject (StringRef Label, const T &Value) |
virtual void | objectBegin () |
virtual void | objectBegin (StringRef Label) |
virtual void | objectEnd () |
virtual void | arrayBegin () |
virtual void | arrayBegin (StringRef Label) |
virtual void | arrayEnd () |
virtual raw_ostream & | startLine () |
virtual raw_ostream & | getOStream () |
Static Public Member Functions | |
static bool | classof (const ScopedPrinter *SP) |
Definition at line 100 of file ScopedPrinter.h.
|
strong |
Enumerator | |
---|---|
Base | |
JSON |
Definition at line 102 of file ScopedPrinter.h.
|
inline |
Definition at line 107 of file ScopedPrinter.h.
References OS.
|
virtualdefault |
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 410 of file ScopedPrinter.h.
Referenced by llvm::ListScope::ListScope(), and llvm::ListScope::setPrinter().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 412 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 414 of file ScopedPrinter.h.
Referenced by llvm::ListScope::~ListScope().
|
inlinestatic |
Definition at line 113 of file ScopedPrinter.h.
|
inline |
Definition at line 119 of file ScopedPrinter.h.
References llvm::raw_ostream::flush().
|
inline |
Definition at line 129 of file ScopedPrinter.h.
|
inline |
Definition at line 111 of file ScopedPrinter.h.
Referenced by classof(), and llvm::JSONScopedPrinter::classof().
|
inlinevirtual |
Definition at line 421 of file ScopedPrinter.h.
Referenced by llvm::logicalview::LVLogicalVisitor::printMemberBegin(), llvm::logicalview::LVLogicalVisitor::printTypeBegin(), printVersion(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::codeview::TypeDumpVisitor::visitMemberBegin(), llvm::logicalview::LVTypeVisitor::visitMemberBegin(), llvm::codeview::TypeDumpVisitor::visitTypeBegin(), and llvm::logicalview::LVTypeVisitor::visitTypeBegin().
Definition at line 139 of file ScopedPrinter.h.
Referenced by printFlags(), printHex(), and printSymbolOffset().
|
inline |
Definition at line 121 of file ScopedPrinter.h.
Referenced by llvm::ELFAttributeParser::parse(), llvm::logicalview::LVLogicalVisitor::printMemberBegin(), llvm::logicalview::LVLogicalVisitor::printTypeBegin(), llvm::codeview::TypeDumpVisitor::visitMemberBegin(), llvm::logicalview::LVTypeVisitor::visitMemberBegin(), and llvm::codeview::TypeDumpVisitor::visitTypeBegin().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 404 of file ScopedPrinter.h.
Referenced by llvm::DictScope::DictScope(), and llvm::DictScope::setPrinter().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 406 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 408 of file ScopedPrinter.h.
Referenced by llvm::DictScope::~DictScope().
Definition at line 373 of file ScopedPrinter.h.
Definition at line 369 of file ScopedPrinter.h.
|
inline |
Definition at line 363 of file ScopedPrinter.h.
|
inline |
Definition at line 359 of file ScopedPrinter.h.
Definition at line 379 of file ScopedPrinter.h.
Definition at line 390 of file ScopedPrinter.h.
|
inline |
Definition at line 385 of file ScopedPrinter.h.
Referenced by llvm::codeview::TypeDumpVisitor::visitMemberEnd(), and llvm::codeview::TypeDumpVisitor::visitTypeEnd().
Definition at line 394 of file ScopedPrinter.h.
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 250 of file ScopedPrinter.h.
References startLine().
Referenced by llvm::logicalview::LVSymbolVisitor::visitKnownRecord().
|
inline |
Definition at line 142 of file ScopedPrinter.h.
References Name, and printHex().
Referenced by llvm::ELFAttributeParser::parseSubsection(), llvm::logicalview::LVLogicalVisitor::printMemberBegin(), llvm::logicalview::LVLogicalVisitor::printTypeBegin(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::codeview::TypeDumpVisitor::visitMemberBegin(), llvm::logicalview::LVSymbolVisitor::visitSymbolBegin(), llvm::logicalview::LVSymbolVisitor::visitSymbolEnd(), llvm::codeview::TypeDumpVisitor::visitTypeBegin(), and llvm::codeview::TypeDumpVisitor::visitUnknownType().
Definition at line 188 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and hex().
|
inline |
Definition at line 161 of file ScopedPrinter.h.
Referenced by llvm::logicalview::LVSymbolVisitor::visitKnownRecord().
|
inline |
Definition at line 340 of file ScopedPrinter.h.
References hex().
Definition at line 336 of file ScopedPrinter.h.
References hex().
Referenced by llvm::logicalview::LVLogicalVisitor::getElement(), printEnum(), llvm::logicalview::LVLogicalVisitor::visitKnownMember(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::logicalview::LVLogicalVisitor::visitKnownRecord(), llvm::codeview::TypeDumpVisitor::visitUnknownMember(), llvm::logicalview::LVTypeVisitor::visitUnknownMember(), and llvm::logicalview::LVLogicalVisitor::visitUnknownMember().
|
inline |
Definition at line 329 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and llvm::List.
|
inline |
Definition at line 133 of file ScopedPrinter.h.
Referenced by startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 314 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 268 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 303 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 299 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 295 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 307 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 272 of file ScopedPrinter.h.
References llvm::List.
|
inline |
Definition at line 261 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), llvm::List, printList(), and llvm::to_string().
Referenced by llvm::ELFAttributeParser::parseSubsection(), and printList().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 284 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 280 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 276 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 288 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and llvm::List.
|
inline |
Definition at line 319 of file ScopedPrinter.h.
References llvm::List, Printer, and startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 233 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 241 of file ScopedPrinter.h.
References llvm::format(), and startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 237 of file ScopedPrinter.h.
References llvm::format(), and startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 225 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 221 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 217 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 229 of file ScopedPrinter.h.
References startLine().
|
inline |
Definition at line 246 of file ScopedPrinter.h.
References llvm::to_string().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 209 of file ScopedPrinter.h.
References startLine().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 205 of file ScopedPrinter.h.
References startLine().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 201 of file ScopedPrinter.h.
References startLine().
Referenced by llvm::ELFAttributeParser::integerAttribute(), llvm::ELFAttributeParser::parseSubsection(), llvm::ELFAttributeParser::printAttribute(), llvm::logicalview::LVLogicalVisitor::processLines(), llvm::ELFAttributeParser::stringAttribute(), llvm::logicalview::LVLogicalVisitor::visitKnownMember(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::logicalview::LVLogicalVisitor::visitKnownRecord(), llvm::logicalview::LVTypeVisitor::visitKnownRecord(), llvm::logicalview::LVSymbolVisitor::visitSymbolBegin(), llvm::logicalview::LVSymbolVisitor::visitUnknownSymbol(), llvm::codeview::TypeDumpVisitor::visitUnknownType(), llvm::logicalview::LVTypeVisitor::visitUnknownType(), and llvm::logicalview::LVLogicalVisitor::visitUnknownType().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 213 of file ScopedPrinter.h.
References startLine().
|
inline |
Definition at line 400 of file ScopedPrinter.h.
References printString(), and llvm::to_string().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 351 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 349 of file ScopedPrinter.h.
References startLine().
Referenced by llvm::logicalview::LVLogicalVisitor::createElement(), llvm::logicalview::LVCodeViewReader::createScopes(), llvm::logicalview::LVELFReader::createScopes(), llvm::ELFAttributeParser::integerAttribute(), llvm::ELFAttributeParser::parseSubsection(), llvm::ELFAttributeParser::printAttribute(), printObject(), llvm::ELFAttributeParser::stringAttribute(), llvm::logicalview::LVLogicalVisitor::visitKnownMember(), llvm::logicalview::LVSymbolVisitor::visitKnownRecord(), llvm::logicalview::LVLogicalVisitor::visitKnownRecord(), and llvm::logicalview::LVTypeVisitor::visitKnownRecord().
Definition at line 355 of file ScopedPrinter.h.
|
inline |
Definition at line 345 of file ScopedPrinter.h.
References hex().
|
inline |
Definition at line 254 of file ScopedPrinter.h.
References getOStream(), and startLine().
|
inline |
Definition at line 127 of file ScopedPrinter.h.
|
inline |
Definition at line 131 of file ScopedPrinter.h.
References P.
|
inlinevirtual |
Definition at line 416 of file ScopedPrinter.h.
References printIndent().
Referenced by llvm::logicalview::LVCodeViewReader::createScopes(), llvm::logicalview::LVELFReader::createScopes(), llvm::ELFAttributeParser::parse(), printBoolean(), printList(), llvm::logicalview::LVLogicalVisitor::printMemberBegin(), llvm::logicalview::LVLogicalVisitor::printMemberEnd(), printNumber(), printString(), llvm::logicalview::LVLogicalVisitor::printTypeBegin(), llvm::logicalview::LVLogicalVisitor::printTypeEnd(), printVersion(), llvm::codeview::TypeDumpVisitor::visitMemberBegin(), llvm::logicalview::LVTypeVisitor::visitMemberBegin(), llvm::codeview::TypeDumpVisitor::visitMemberEnd(), llvm::logicalview::LVTypeVisitor::visitMemberEnd(), llvm::codeview::TypeDumpVisitor::visitTypeBegin(), and llvm::codeview::TypeDumpVisitor::visitTypeEnd().
|
inline |
Definition at line 123 of file ScopedPrinter.h.
Referenced by llvm::ELFAttributeParser::parse(), llvm::logicalview::LVLogicalVisitor::printMemberEnd(), llvm::logicalview::LVLogicalVisitor::printTypeEnd(), llvm::codeview::TypeDumpVisitor::visitMemberEnd(), llvm::logicalview::LVTypeVisitor::visitMemberEnd(), and llvm::codeview::TypeDumpVisitor::visitTypeEnd().