Scoped printer that emits JSON objects and arrays.

Synopsis

Declared in <llvm/Support/ScopedPrinter.h>

class JSONScopedPrinter
    : public ScopedPrinter

Base Classes

Name

Description

ScopedPrinter

Pretty‐printer that emits indented, labeled text with nested scopes.

Enums

Name

Description

ScopedPrinterKind

Discriminator for ScopedPrinter subclasses used with LLVM RTTI.

Member Functions

Name

Description

JSONScopedPrinter [constructor]

Construct a JSON scoped printer writing to OS.

arrayBegin

arrayBegin overloads

arrayEnd [virtual]

End the current JSON array.

flush

Flush the underlying output stream.

getIndentLevel

Return the current indentation level.

getKind

Return the RTTI kind of this printer.

getOStream [virtual]

Return the underlying output stream.

hex

Wrap Value as a HexNumber for hexadecimal printing.

indent

Increase the indentation level by Levels.

objectBegin

objectBegin overloads

objectEnd [virtual]

End the current JSON object.

printBinary

printBinary overloads

printBinaryBlock

printBinaryBlock overloads

printBoolean [virtual]

Print a labeled boolean as a JSON attribute.

printEnum

Print an enumeration value by name when known, otherwise as hex.

printFlags

printFlags overloads

printHex

printHex overloads

printHexList

Print a labeled list of values in hexadecimal.

printIndent

Print the current prefix and indentation whitespace.

printList

printList overloads

printNumber

printNumber overloads

printObject

Print a labeled object by converting it to a string.

printString

printString overloads

printStringEscaped

Print a labeled string with C‐style escapes.

printSymbolOffset

Print a labeled symbol name plus hexadecimal offset.

printVersion

Print a labeled dotted version number.

resetIndent

Reset the indentation level to zero.

setPrefix

Set the prefix printed before each indented line.

startLine [virtual]

Start a new indented line and return the output stream.

unindent

Decrease the indentation level by Levels.

Static Member Functions

Name

Description

classof

Return true if SP is a JSONScopedPrinter.

Non-Member Functions

Name

Description

codeview::printTypeIndex

Print TypeIndex TI named FieldName to Printer using Types.

Created with MrDocs