LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
OutputBuffer Class Reference

#include "llvm/Demangle/Utility.h"

Public Member Functions

 OutputBuffer (char *StartBuf, size_t Size)
 
 OutputBuffer (char *StartBuf, size_t *SizePtr)
 
 OutputBuffer ()=default
 
 OutputBuffer (const OutputBuffer &)=delete
 
OutputBufferoperator= (const OutputBuffer &)=delete
 
 operator std::string_view () const
 
bool isGtInsideTemplateArgs () const
 
void printOpen (char Open='(')
 
void printClose (char Close=')')
 
OutputBufferoperator+= (std::string_view R)
 
OutputBufferoperator+= (char C)
 
OutputBufferprepend (std::string_view R)
 
OutputBufferoperator<< (std::string_view R)
 
OutputBufferoperator<< (char C)
 
OutputBufferoperator<< (long long N)
 
OutputBufferoperator<< (unsigned long long N)
 
OutputBufferoperator<< (long N)
 
OutputBufferoperator<< (unsigned long N)
 
OutputBufferoperator<< (int N)
 
OutputBufferoperator<< (unsigned int N)
 
void insert (size_t Pos, const char *S, size_t N)
 
size_t getCurrentPosition () const
 
void setCurrentPosition (size_t NewPos)
 
char back () const
 
bool empty () const
 
chargetBuffer ()
 
chargetBufferEnd ()
 
size_t getBufferCapacity () const
 

Public Attributes

unsigned CurrentPackIndex = std::numeric_limits<unsigned>::max()
 If a ParameterPackExpansion (or similar type) is encountered, the offset into the pack that we're currently printing.
 
unsigned CurrentPackMax = std::numeric_limits<unsigned>::max()
 
unsigned GtIsGt = 1
 When zero, we're printing template args and '>' needs to be parenthesized.
 

Detailed Description

Definition at line 32 of file Utility.h.

Constructor & Destructor Documentation

◆ OutputBuffer() [1/4]

OutputBuffer::OutputBuffer ( char StartBuf,
size_t  Size 
)
inline

Definition at line 73 of file Utility.h.

◆ OutputBuffer() [2/4]

OutputBuffer::OutputBuffer ( char StartBuf,
size_t *  SizePtr 
)
inline

Definition at line 75 of file Utility.h.

◆ OutputBuffer() [3/4]

OutputBuffer::OutputBuffer ( )
default

◆ OutputBuffer() [4/4]

OutputBuffer::OutputBuffer ( const OutputBuffer )
delete

Member Function Documentation

◆ back()

char OutputBuffer::back ( ) const
inline

Definition at line 173 of file Utility.h.

References DEMANGLE_ASSERT.

◆ empty()

bool OutputBuffer::empty ( ) const
inline

Definition at line 178 of file Utility.h.

◆ getBuffer()

char * OutputBuffer::getBuffer ( )
inline

Definition at line 180 of file Utility.h.

◆ getBufferCapacity()

size_t OutputBuffer::getBufferCapacity ( ) const
inline

Definition at line 182 of file Utility.h.

◆ getBufferEnd()

char * OutputBuffer::getBufferEnd ( )
inline

Definition at line 181 of file Utility.h.

◆ getCurrentPosition()

size_t OutputBuffer::getCurrentPosition ( ) const
inline

Definition at line 170 of file Utility.h.

◆ insert()

void OutputBuffer::insert ( size_t  Pos,
const char S,
size_t  N 
)
inline

Definition at line 160 of file Utility.h.

References DEMANGLE_ASSERT, and N.

◆ isGtInsideTemplateArgs()

bool OutputBuffer::isGtInsideTemplateArgs ( ) const
inline

Definition at line 95 of file Utility.h.

References GtIsGt.

◆ operator std::string_view()

OutputBuffer::operator std::string_view ( ) const
inline

Definition at line 82 of file Utility.h.

◆ operator+=() [1/2]

OutputBuffer & OutputBuffer::operator+= ( char  C)
inline

Definition at line 115 of file Utility.h.

References C.

◆ operator+=() [2/2]

OutputBuffer & OutputBuffer::operator+= ( std::string_view  R)
inline

Definition at line 106 of file Utility.h.

References Size.

◆ operator<<() [1/8]

OutputBuffer & OutputBuffer::operator<< ( char  C)
inline

Definition at line 134 of file Utility.h.

References C.

◆ operator<<() [2/8]

OutputBuffer & OutputBuffer::operator<< ( int  N)
inline

Definition at line 152 of file Utility.h.

References N.

◆ operator<<() [3/8]

OutputBuffer & OutputBuffer::operator<< ( long long  N)
inline

Definition at line 136 of file Utility.h.

References N.

◆ operator<<() [4/8]

OutputBuffer & OutputBuffer::operator<< ( long  N)
inline

Definition at line 144 of file Utility.h.

References N.

◆ operator<<() [5/8]

OutputBuffer & OutputBuffer::operator<< ( std::string_view  R)
inline

Definition at line 132 of file Utility.h.

◆ operator<<() [6/8]

OutputBuffer & OutputBuffer::operator<< ( unsigned int  N)
inline

Definition at line 156 of file Utility.h.

References N.

◆ operator<<() [7/8]

OutputBuffer & OutputBuffer::operator<< ( unsigned long long  N)
inline

Definition at line 140 of file Utility.h.

References N.

◆ operator<<() [8/8]

OutputBuffer & OutputBuffer::operator<< ( unsigned long  N)
inline

Definition at line 148 of file Utility.h.

References N.

◆ operator=()

OutputBuffer & OutputBuffer::operator= ( const OutputBuffer )
delete

◆ prepend()

OutputBuffer & OutputBuffer::prepend ( std::string_view  R)
inline

Definition at line 121 of file Utility.h.

References Size.

◆ printClose()

void OutputBuffer::printClose ( char  Close = ')')
inline

Definition at line 101 of file Utility.h.

References GtIsGt.

◆ printOpen()

void OutputBuffer::printOpen ( char  Open = '(')
inline

Definition at line 97 of file Utility.h.

References GtIsGt.

◆ setCurrentPosition()

void OutputBuffer::setCurrentPosition ( size_t  NewPos)
inline

Definition at line 171 of file Utility.h.

Member Data Documentation

◆ CurrentPackIndex

unsigned OutputBuffer::CurrentPackIndex = std::numeric_limits<unsigned>::max()

If a ParameterPackExpansion (or similar type) is encountered, the offset into the pack that we're currently printing.

Definition at line 88 of file Utility.h.

◆ CurrentPackMax

unsigned OutputBuffer::CurrentPackMax = std::numeric_limits<unsigned>::max()

Definition at line 89 of file Utility.h.

◆ GtIsGt

unsigned OutputBuffer::GtIsGt = 1

When zero, we're printing template args and '>' needs to be parenthesized.

Use a counter so we can simply increment inside parentheses.

Definition at line 93 of file Utility.h.

Referenced by isGtInsideTemplateArgs(), printClose(), and printOpen().


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