LLVM 22.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={}, ArrayRef< FlagEntry > ExtraFlags={}) |
template<typename T> | |
void | printFlags (StringRef Label, T Value) |
virtual void | printNumber (StringRef Label, char Value) |
virtual void | printNumber (StringRef Label, signed char Value) |
virtual void | printNumber (StringRef Label, unsigned char Value) |
virtual void | printNumber (StringRef Label, short Value) |
virtual void | printNumber (StringRef Label, unsigned short Value) |
virtual void | printNumber (StringRef Label, int Value) |
virtual void | printNumber (StringRef Label, unsigned int Value) |
virtual void | printNumber (StringRef Label, long Value) |
virtual void | printNumber (StringRef Label, unsigned long Value) |
virtual void | printNumber (StringRef Label, long long Value) |
virtual void | printNumber (StringRef Label, unsigned long long 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, typename... TArgs> | |
void | printVersion (StringRef Label, T MajorVersion, TArgs... MinorVersions) |
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 121 of file ScopedPrinter.h.
|
strong |
Enumerator | |
---|---|
Base | |
JSON |
Definition at line 123 of file ScopedPrinter.h.
|
inline |
Definition at line 128 of file ScopedPrinter.h.
References Base.
Referenced by llvm::JSONScopedPrinter::classof(), classof(), and llvm::JSONScopedPrinter::JSONScopedPrinter().
|
virtualdefault |
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 445 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 447 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 449 of file ScopedPrinter.h.
|
inlinestatic |
Definition at line 134 of file ScopedPrinter.h.
References Base, and ScopedPrinter().
|
inline |
Definition at line 140 of file ScopedPrinter.h.
|
inline |
Definition at line 150 of file ScopedPrinter.h.
|
inline |
Definition at line 132 of file ScopedPrinter.h.
|
inlinevirtual |
Definition at line 456 of file ScopedPrinter.h.
Referenced by printVersion().
Definition at line 160 of file ScopedPrinter.h.
References T.
Referenced by printFlags(), printHex(), printHex(), and printSymbolOffset().
|
inline |
Definition at line 142 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 439 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 441 of file ScopedPrinter.h.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 443 of file ScopedPrinter.h.
Definition at line 408 of file ScopedPrinter.h.
Definition at line 404 of file ScopedPrinter.h.
|
inline |
Definition at line 398 of file ScopedPrinter.h.
|
inline |
Definition at line 394 of file ScopedPrinter.h.
Definition at line 414 of file ScopedPrinter.h.
Definition at line 425 of file ScopedPrinter.h.
|
inline |
Definition at line 420 of file ScopedPrinter.h.
Definition at line 429 of file ScopedPrinter.h.
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 283 of file ScopedPrinter.h.
References startLine().
|
inline |
Definition at line 163 of file ScopedPrinter.h.
References printHex(), and T.
Definition at line 209 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), hex(), and T.
|
inline |
Definition at line 182 of file ScopedPrinter.h.
References T.
|
inline |
Definition at line 375 of file ScopedPrinter.h.
Definition at line 371 of file ScopedPrinter.h.
Referenced by printEnum(), and llvm::ScopedPrinter::printHex< support::ulittle16_t >().
|
inline |
Definition at line 364 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), llvm::List, and T.
|
inline |
Definition at line 154 of file ScopedPrinter.h.
Referenced by startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 349 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 338 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 334 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 330 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 342 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 307 of file ScopedPrinter.h.
References llvm::List.
|
inline |
Definition at line 296 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), llvm::List, printList(), and llvm::to_string().
Referenced by printList().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 319 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 315 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 311 of file ScopedPrinter.h.
References llvm::List.
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 323 of file ScopedPrinter.h.
References llvm::SmallVectorImpl< T >::emplace_back(), and llvm::List.
|
inline |
Definition at line 354 of file ScopedPrinter.h.
References llvm::List, Printer, startLine(), and T.
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 222 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 266 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 274 of file ScopedPrinter.h.
References llvm::format(), and startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 270 of file ScopedPrinter.h.
References llvm::format(), and startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 242 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 258 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 250 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 234 of file ScopedPrinter.h.
References startLine().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 226 of file ScopedPrinter.h.
References startLine().
|
inline |
Definition at line 279 of file ScopedPrinter.h.
References T, and llvm::to_string().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 230 of file ScopedPrinter.h.
References startLine().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 246 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 262 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 254 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 238 of file ScopedPrinter.h.
References startLine().
|
inline |
Definition at line 435 of file ScopedPrinter.h.
References printString(), T, and llvm::to_string().
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 386 of file ScopedPrinter.h.
References startLine().
|
inlinevirtual |
Reimplemented in llvm::JSONScopedPrinter.
Definition at line 384 of file ScopedPrinter.h.
References startLine().
Referenced by printObject().
Definition at line 390 of file ScopedPrinter.h.
|
inline |
Definition at line 380 of file ScopedPrinter.h.
|
inline |
Definition at line 288 of file ScopedPrinter.h.
References getOStream(), startLine(), and T.
|
inline |
Definition at line 148 of file ScopedPrinter.h.
|
inline |
Definition at line 152 of file ScopedPrinter.h.
References P.
|
inlinevirtual |
Definition at line 451 of file ScopedPrinter.h.
References printIndent().
Referenced by printBoolean(), printList(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printNumber(), printString(), printString(), and printVersion().
|
inline |
Definition at line 144 of file ScopedPrinter.h.