LLVM 23.0.0git
llvm::JSONScopedPrinter Class Reference

#include "llvm/Support/ScopedPrinter.h"

Inheritance diagram for llvm::JSONScopedPrinter:
[legend]

Public Member Functions

LLVM_ABI JSONScopedPrinter (raw_ostream &OS, bool PrettyPrint=false, std::unique_ptr< DelimitedScope > &&OuterScope=std::unique_ptr< DelimitedScope >{})
void printNumber (StringRef Label, char Value) override
void printNumber (StringRef Label, signed char Value) override
void printNumber (StringRef Label, unsigned char Value) override
void printNumber (StringRef Label, short Value) override
void printNumber (StringRef Label, unsigned short Value) override
void printNumber (StringRef Label, int Value) override
void printNumber (StringRef Label, unsigned int Value) override
void printNumber (StringRef Label, long Value) override
void printNumber (StringRef Label, unsigned long Value) override
void printNumber (StringRef Label, long long Value) override
void printNumber (StringRef Label, unsigned long long Value) override
void printNumber (StringRef Label, float Value) override
void printNumber (StringRef Label, double Value) override
void printNumber (StringRef Label, const APSInt &Value) override
void printBoolean (StringRef Label, bool Value) override
void printList (StringRef Label, const ArrayRef< bool > List) override
void printList (StringRef Label, const ArrayRef< std::string > List) override
void printList (StringRef Label, const ArrayRef< uint64_t > List) override
void printList (StringRef Label, const ArrayRef< uint32_t > List) override
void printList (StringRef Label, const ArrayRef< uint16_t > List) override
void printList (StringRef Label, const ArrayRef< uint8_t > List) override
void printList (StringRef Label, const ArrayRef< int64_t > List) override
void printList (StringRef Label, const ArrayRef< int32_t > List) override
void printList (StringRef Label, const ArrayRef< int16_t > List) override
void printList (StringRef Label, const ArrayRef< int8_t > List) override
void printList (StringRef Label, const ArrayRef< APSInt > List) override
void printString (StringRef Value) override
void printString (StringRef Label, StringRef Value) override
void objectBegin () override
void objectBegin (StringRef Label) override
void objectEnd () override
void arrayBegin () override
void arrayBegin (StringRef Label) override
void arrayEnd () override
Public Member Functions inherited from llvm::ScopedPrinter
 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, unsigned NumStrs>
void printEnum (StringRef Label, T Value, EnumStrings< TEnum, NumStrs > EnumValues)
template<typename T, typename TFlag, unsigned NumStrs>
void printFlags (StringRef Label, T Value, EnumStrings< TFlag, NumStrs > Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={}, ArrayRef< FlagEntry > ExtraFlags={})
template<typename T>
void printFlags (StringRef Label, T Value, SmallVectorImpl< FlagEntry > &SetFlags)
template<typename T>
void printFlags (StringRef Label, T Value)
template<typename T>
void printNumber (StringRef Label, StringRef Str, T 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)
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 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 raw_ostreamstartLine ()
virtual raw_ostreamgetOStream ()

Static Public Member Functions

static bool classof (const ScopedPrinter *SP)
Static Public Member Functions inherited from llvm::ScopedPrinter
static bool classof (const ScopedPrinter *SP)

Additional Inherited Members

Public Types inherited from llvm::ScopedPrinter
enum class  ScopedPrinterKind { Base , JSON }

Detailed Description

Definition at line 526 of file ScopedPrinter.h.

Constructor & Destructor Documentation

◆ JSONScopedPrinter()

JSONScopedPrinter::JSONScopedPrinter ( raw_ostream & OS,
bool PrettyPrint = false,
std::unique_ptr< DelimitedScope > && OuterScope = std::unique_ptr<DelimitedScope>{} )

Member Function Documentation

◆ arrayBegin() [1/2]

void llvm::JSONScopedPrinter::arrayBegin ( )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 685 of file ScopedPrinter.h.

◆ arrayBegin() [2/2]

void llvm::JSONScopedPrinter::arrayBegin ( StringRef Label)
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 689 of file ScopedPrinter.h.

◆ arrayEnd()

void llvm::JSONScopedPrinter::arrayEnd ( )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 693 of file ScopedPrinter.h.

◆ classof()

bool llvm::JSONScopedPrinter::classof ( const ScopedPrinter * SP)
inlinestatic

◆ objectBegin() [1/2]

void llvm::JSONScopedPrinter::objectBegin ( )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 675 of file ScopedPrinter.h.

◆ objectBegin() [2/2]

void llvm::JSONScopedPrinter::objectBegin ( StringRef Label)
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 679 of file ScopedPrinter.h.

◆ objectEnd()

void llvm::JSONScopedPrinter::objectEnd ( )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 683 of file ScopedPrinter.h.

◆ printBoolean()

void llvm::JSONScopedPrinter::printBoolean ( StringRef Label,
bool Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 617 of file ScopedPrinter.h.

◆ printList() [1/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< APSInt > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 661 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [2/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< bool > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 621 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [3/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< int16_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 653 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [4/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< int32_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 649 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [5/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< int64_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 645 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [6/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< int8_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 657 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [7/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< std::string > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 625 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [8/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< uint16_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 637 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [9/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< uint32_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 633 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [10/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< uint64_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 629 of file ScopedPrinter.h.

References llvm::List.

◆ printList() [11/11]

void llvm::JSONScopedPrinter::printList ( StringRef Label,
const ArrayRef< uint8_t > List )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 641 of file ScopedPrinter.h.

References llvm::List.

◆ printNumber() [1/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
char Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 559 of file ScopedPrinter.h.

◆ printNumber() [2/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
const APSInt & Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 611 of file ScopedPrinter.h.

◆ printNumber() [3/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
double Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 607 of file ScopedPrinter.h.

◆ printNumber() [4/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
float Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 603 of file ScopedPrinter.h.

◆ printNumber() [5/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
int Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 579 of file ScopedPrinter.h.

◆ printNumber() [6/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
long long Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 595 of file ScopedPrinter.h.

◆ printNumber() [7/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
long Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 587 of file ScopedPrinter.h.

◆ printNumber() [8/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
short Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 571 of file ScopedPrinter.h.

◆ printNumber() [9/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
signed char Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 563 of file ScopedPrinter.h.

◆ printNumber() [10/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
unsigned char Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 567 of file ScopedPrinter.h.

◆ printNumber() [11/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
unsigned int Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 583 of file ScopedPrinter.h.

◆ printNumber() [12/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
unsigned long long Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 599 of file ScopedPrinter.h.

◆ printNumber() [13/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
unsigned long Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 591 of file ScopedPrinter.h.

◆ printNumber() [14/14]

void llvm::JSONScopedPrinter::printNumber ( StringRef Label,
unsigned short Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 575 of file ScopedPrinter.h.

◆ printString() [1/2]

void llvm::JSONScopedPrinter::printString ( StringRef Label,
StringRef Value )
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 671 of file ScopedPrinter.h.

◆ printString() [2/2]

void llvm::JSONScopedPrinter::printString ( StringRef Value)
inlineoverridevirtual

Reimplemented from llvm::ScopedPrinter.

Definition at line 669 of file ScopedPrinter.h.


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