LLVM  14.0.0git
Public Member Functions | List of all members
llvm::ScopedPrinter Class Reference

#include "llvm/Support/ScopedPrinter.h"

Public Member Functions

 ScopedPrinter (raw_ostream &OS)
 
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)
 
void printNumber (StringRef Label, uint64_t Value)
 
void printNumber (StringRef Label, uint32_t Value)
 
void printNumber (StringRef Label, uint16_t Value)
 
void printNumber (StringRef Label, uint8_t Value)
 
void printNumber (StringRef Label, int64_t Value)
 
void printNumber (StringRef Label, int32_t Value)
 
void printNumber (StringRef Label, int16_t Value)
 
void printNumber (StringRef Label, int8_t Value)
 
void printNumber (StringRef Label, const APSInt &Value)
 
void printBoolean (StringRef Label, bool Value)
 
template<typename... T>
void printVersion (StringRef Label, T... Version)
 
template<typename T >
void printList (StringRef Label, const T &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)
 
void printString (StringRef Value)
 
void printString (StringRef Label, StringRef Value)
 
void printString (StringRef Label, const std::string &Value)
 
void printString (StringRef Label, const char *Value)
 
template<typename T >
void printNumber (StringRef Label, StringRef Str, T 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)
 
raw_ostreamstartLine ()
 
raw_ostreamgetOStream ()
 

Detailed Description

Definition at line 70 of file ScopedPrinter.h.

Constructor & Destructor Documentation

◆ ScopedPrinter()

llvm::ScopedPrinter::ScopedPrinter ( raw_ostream OS)
inline

Definition at line 72 of file ScopedPrinter.h.

Member Function Documentation

◆ flush()

void llvm::ScopedPrinter::flush ( )
inline

Definition at line 74 of file ScopedPrinter.h.

References llvm::raw_ostream::flush().

◆ getIndentLevel()

int llvm::ScopedPrinter::getIndentLevel ( )
inline

Definition at line 84 of file ScopedPrinter.h.

◆ getOStream()

raw_ostream& llvm::ScopedPrinter::getOStream ( )
inline

◆ hex()

template<typename T >
HexNumber llvm::ScopedPrinter::hex ( Value)
inline

Definition at line 94 of file ScopedPrinter.h.

Referenced by printEnum(), printFlags(), printHex(), printHexList(), and printSymbolOffset().

◆ indent()

void llvm::ScopedPrinter::indent ( int  Levels = 1)
inline

◆ printBinary() [1/5]

void llvm::ScopedPrinter::printBinary ( StringRef  Label,
ArrayRef< char >  Value 
)
inline

Definition at line 283 of file ScopedPrinter.h.

References llvm::makeArrayRef().

◆ printBinary() [2/5]

void llvm::ScopedPrinter::printBinary ( StringRef  Label,
ArrayRef< uint8_t >  Value 
)
inline

Definition at line 279 of file ScopedPrinter.h.

◆ printBinary() [3/5]

void llvm::ScopedPrinter::printBinary ( StringRef  Label,
StringRef  Str,
ArrayRef< char >  Value 
)
inline

Definition at line 273 of file ScopedPrinter.h.

References llvm::makeArrayRef().

◆ printBinary() [4/5]

void llvm::ScopedPrinter::printBinary ( StringRef  Label,
StringRef  Str,
ArrayRef< uint8_t >  Value 
)
inline

Definition at line 269 of file ScopedPrinter.h.

◆ printBinary() [5/5]

void llvm::ScopedPrinter::printBinary ( StringRef  Label,
StringRef  Value 
)
inline

Definition at line 289 of file ScopedPrinter.h.

References llvm::makeArrayRef().

◆ printBinaryBlock() [1/3]

void llvm::ScopedPrinter::printBinaryBlock ( StringRef  Label,
ArrayRef< uint8_t >  Value 
)
inline

Definition at line 300 of file ScopedPrinter.h.

◆ printBinaryBlock() [2/3]

void llvm::ScopedPrinter::printBinaryBlock ( StringRef  Label,
ArrayRef< uint8_t >  Value,
uint32_t  StartOffset 
)
inline

◆ printBinaryBlock() [3/3]

void llvm::ScopedPrinter::printBinaryBlock ( StringRef  Label,
StringRef  Value 
)
inline

Definition at line 304 of file ScopedPrinter.h.

References llvm::makeArrayRef().

◆ printBoolean()

void llvm::ScopedPrinter::printBoolean ( StringRef  Label,
bool  Value 
)
inline

Definition at line 200 of file ScopedPrinter.h.

References startLine().

◆ printEnum()

template<typename T , typename TEnum >
void llvm::ScopedPrinter::printEnum ( StringRef  Label,
Value,
ArrayRef< EnumEntry< TEnum >>  EnumValues 
)
inline

◆ printFlags() [1/2]

template<typename T >
void llvm::ScopedPrinter::printFlags ( StringRef  Label,
Value 
)
inline

Definition at line 151 of file ScopedPrinter.h.

References hex(), and startLine().

◆ printFlags() [2/2]

template<typename T , typename TFlag >
void llvm::ScopedPrinter::printFlags ( StringRef  Label,
Value,
ArrayRef< EnumEntry< TFlag >>  Flags,
TFlag  EnumMask1 = {},
TFlag  EnumMask2 = {},
TFlag  EnumMask3 = {} 
)
inline

Definition at line 117 of file ScopedPrinter.h.

◆ printHex() [1/2]

template<typename T >
void llvm::ScopedPrinter::printHex ( StringRef  Label,
StringRef  Str,
Value 
)
inline

Definition at line 241 of file ScopedPrinter.h.

References hex(), and startLine().

◆ printHex() [2/2]

template<typename T >
void llvm::ScopedPrinter::printHex ( StringRef  Label,
Value 
)
inline

Definition at line 237 of file ScopedPrinter.h.

References hex(), and startLine().

Referenced by llvm::codeview::TypeDumpVisitor::visitUnknownMember().

◆ printHexList()

template<typename T >
void llvm::ScopedPrinter::printHexList ( StringRef  Label,
const T &  List 
)
inline

Definition at line 229 of file ScopedPrinter.h.

References hex(), List, llvm::AArch64CC::LS, and startLine().

◆ printIndent()

void llvm::ScopedPrinter::printIndent ( )
inline

Definition at line 88 of file ScopedPrinter.h.

References i.

Referenced by startLine().

◆ printList() [1/2]

template<typename T >
void llvm::ScopedPrinter::printList ( StringRef  Label,
const T &  List 
)
inline

Definition at line 210 of file ScopedPrinter.h.

References List, llvm::AArch64CC::LS, and startLine().

◆ printList() [2/2]

template<typename T , typename U >
void llvm::ScopedPrinter::printList ( StringRef  Label,
const T &  List,
const U &  Printer 
)
inline

Definition at line 219 of file ScopedPrinter.h.

References List, llvm::AArch64CC::LS, Printer, and startLine().

◆ printNumber() [1/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
const APSInt Value 
)
inline

Definition at line 196 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [2/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
int16_t  Value 
)
inline

Definition at line 188 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [3/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
int32_t  Value 
)
inline

Definition at line 184 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [4/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
int64_t  Value 
)
inline

Definition at line 180 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [5/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
int8_t  Value 
)
inline

Definition at line 192 of file ScopedPrinter.h.

References int, and startLine().

◆ printNumber() [6/10]

template<typename T >
void llvm::ScopedPrinter::printNumber ( StringRef  Label,
StringRef  Str,
Value 
)
inline

Definition at line 265 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [7/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
uint16_t  Value 
)
inline

Definition at line 172 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [8/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
uint32_t  Value 
)
inline

Definition at line 168 of file ScopedPrinter.h.

References startLine().

◆ printNumber() [9/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
uint64_t  Value 
)
inline

Definition at line 164 of file ScopedPrinter.h.

References startLine().

Referenced by llvm::codeview::TypeDumpVisitor::visitUnknownType().

◆ printNumber() [10/10]

void llvm::ScopedPrinter::printNumber ( StringRef  Label,
uint8_t  Value 
)
inline

Definition at line 176 of file ScopedPrinter.h.

References startLine().

◆ printObject()

template<typename T >
void llvm::ScopedPrinter::printObject ( StringRef  Label,
const T &  Value 
)
inline

Definition at line 310 of file ScopedPrinter.h.

References startLine().

◆ printString() [1/4]

void llvm::ScopedPrinter::printString ( StringRef  Label,
const char *  Value 
)
inline

Definition at line 260 of file ScopedPrinter.h.

References printString().

◆ printString() [2/4]

void llvm::ScopedPrinter::printString ( StringRef  Label,
const std::string &  Value 
)
inline

Definition at line 256 of file ScopedPrinter.h.

References printString().

◆ printString() [3/4]

void llvm::ScopedPrinter::printString ( StringRef  Label,
StringRef  Value 
)
inline

Definition at line 252 of file ScopedPrinter.h.

References startLine().

◆ printString() [4/4]

void llvm::ScopedPrinter::printString ( StringRef  Value)
inline

Definition at line 250 of file ScopedPrinter.h.

References startLine().

Referenced by printString().

◆ printSymbolOffset()

template<typename T >
void llvm::ScopedPrinter::printSymbolOffset ( StringRef  Label,
StringRef  Symbol,
Value 
)
inline

Definition at line 246 of file ScopedPrinter.h.

References hex(), startLine(), and llvm::ARMBuildAttrs::Symbol.

◆ printVersion()

template<typename... T>
void llvm::ScopedPrinter::printVersion ( StringRef  Label,
T...  Version 
)
inline

Definition at line 204 of file ScopedPrinter.h.

References getOStream(), startLine(), T, and llvm::IndexedInstrProf::Version.

◆ resetIndent()

void llvm::ScopedPrinter::resetIndent ( )
inline

Definition at line 82 of file ScopedPrinter.h.

◆ setPrefix()

void llvm::ScopedPrinter::setPrefix ( StringRef  P)
inline

Definition at line 86 of file ScopedPrinter.h.

References P.

◆ startLine()

raw_ostream& llvm::ScopedPrinter::startLine ( )
inline

◆ unindent()

void llvm::ScopedPrinter::unindent ( int  Levels = 1)
inline

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