LLVM  14.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
Node Class Referenceabstract

#include "llvm/Demangle/ItaniumDemangle.h"

Inherited by AbiTagAttr, ArraySubscriptExpr, ArrayType, BinaryExpr, BoolExpr, BracedExpr, BracedRangeExpr, CallExpr, CastExpr, ClosureTypeName, ConditionalExpr, ConversionExpr, ConversionOperatorType, CtorDtorName, CtorVtableSpecialName, DeleteExpr, DotSuffix, DtorName, DynamicExceptionSpec, ElaboratedTypeSpefType, EnableIfAttr, EnclosingExpr, EnumLiteral, ExpandedSpecialSubstitution, FloatLiteralImpl< Float >, FoldExpr, ForwardTemplateReference, FunctionEncoding, FunctionParam, FunctionType, GlobalQualifiedName, InitListExpr, IntegerLiteral, LambdaExpr, LiteralOperator, LocalName, MemberExpr, NameType, NameWithTemplateArgs, NestedName, NewExpr, NodeArrayNode, NoexceptSpec, NonTypeTemplateParamDecl, ObjCProtoName, ParameterPack, ParameterPackExpansion, PixelVectorType, PointerToMemberConversionExpr, PointerToMemberType, PointerType, PostfixExpr, PostfixQualifiedType, PrefixExpr, QualifiedName, QualType, ReferenceType, SizeofParamPackExpr, SpecialName, SpecialSubstitution, StdQualifiedName, StringLiteral, StructuredBindingName, SubobjectExpr, SyntheticTemplateParamName, TemplateArgs, TemplateArgumentPack, TemplateParamPackDecl, TemplateTemplateParamDecl, ThrowExpr, TypeTemplateParamDecl, UnnamedTypeName, VectorType, and VendorExtQualType.

Collaboration diagram for Node:
Collaboration graph
[legend]

Public Types

enum  Kind : unsigned char
 
enum  Cache : unsigned char { Cache::Yes, Cache::No, Cache::Unknown }
 Three-way bool to track a cached value. More...
 

Public Member Functions

 Node (Kind K_, Cache RHSComponentCache_=Cache::No, Cache ArrayCache_=Cache::No, Cache FunctionCache_=Cache::No)
 
template<typename Fn >
void visit (Fn F) const
 Visit the most-derived object corresponding to this object. More...
 
bool hasRHSComponent (OutputStream &S) const
 
bool hasArray (OutputStream &S) const
 
bool hasFunction (OutputStream &S) const
 
Kind getKind () const
 
virtual bool hasRHSComponentSlow (OutputStream &) const
 
virtual bool hasArraySlow (OutputStream &) const
 
virtual bool hasFunctionSlow (OutputStream &) const
 
virtual const NodegetSyntaxNode (OutputStream &) const
 
void print (OutputStream &S) const
 
virtual void printLeft (OutputStream &) const =0
 
virtual void printRight (OutputStream &) const
 
virtual StringView getBaseName () const
 
virtual ~Node ()=default
 
DEMANGLE_DUMP_METHOD void dump () const
 

Public Attributes

Cache RHSComponentCache
 Tracks if this node has a component on its right side, in which case we need to call printRight. More...
 
Cache ArrayCache
 Track if this node is a (possibly qualified) array type. More...
 
Cache FunctionCache
 Track if this node is a (possibly qualified) function type. More...
 

Detailed Description

Definition at line 114 of file ItaniumDemangle.h.

Member Enumeration Documentation

◆ Cache

enum Node::Cache : unsigned char
strong

Three-way bool to track a cached value.

Unknown is possible if this node has an unexpanded parameter pack below it that may affect this cache.

Enumerator
Yes 
No 
Unknown 

Definition at line 124 of file ItaniumDemangle.h.

◆ Kind

enum Node::Kind : unsigned char

Definition at line 116 of file ItaniumDemangle.h.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( Kind  K_,
Cache  RHSComponentCache_ = Cache::No,
Cache  ArrayCache_ = Cache::No,
Cache  FunctionCache_ = Cache::No 
)
inline

Definition at line 144 of file ItaniumDemangle.h.

◆ ~Node()

virtual Node::~Node ( )
virtualdefault

Member Function Documentation

◆ dump()

DEMANGLE_DUMP_METHOD void Node::dump ( ) const

Referenced by llvm::SDValue::dump().

◆ getBaseName()

virtual StringView Node::getBaseName ( ) const
inlinevirtual

◆ getKind()

Kind Node::getKind ( ) const
inline

◆ getSyntaxNode()

virtual const Node* Node::getSyntaxNode ( OutputStream ) const
inlinevirtual

Reimplemented in ForwardTemplateReference, and ParameterPack.

Definition at line 184 of file ItaniumDemangle.h.

Referenced by ForwardTemplateReference::getSyntaxNode().

◆ hasArray()

bool Node::hasArray ( OutputStream S) const
inline

◆ hasArraySlow()

virtual bool Node::hasArraySlow ( OutputStream ) const
inlinevirtual

Reimplemented in ForwardTemplateReference, ParameterPack, QualType, and ArrayType.

Definition at line 179 of file ItaniumDemangle.h.

Referenced by hasArray().

◆ hasFunction()

bool Node::hasFunction ( OutputStream S) const
inline

◆ hasFunctionSlow()

virtual bool Node::hasFunctionSlow ( OutputStream ) const
inlinevirtual

Reimplemented in ForwardTemplateReference, ParameterPack, QualType, FunctionEncoding, and FunctionType.

Definition at line 180 of file ItaniumDemangle.h.

Referenced by hasFunction().

◆ hasRHSComponent()

bool Node::hasRHSComponent ( OutputStream S) const
inline

◆ hasRHSComponentSlow()

virtual bool Node::hasRHSComponentSlow ( OutputStream ) const
inlinevirtual

◆ print()

void Node::print ( OutputStream S) const
inline

◆ printLeft()

virtual void Node::printLeft ( OutputStream ) const
pure virtual

◆ printRight()

virtual void Node::printRight ( OutputStream ) const
inlinevirtual

◆ visit()

template<typename Fn >
void Node::visit ( Fn  F) const

Visit the most-derived object corresponding to this object.

Visit the node.

Calls F(P), where P is the node cast to the appropriate derived class.

Definition at line 2199 of file ItaniumDemangle.h.

References assert(), CASE, and FOR_EACH_NODE_KIND.

Member Data Documentation

◆ ArrayCache

Cache Node::ArrayCache

Track if this node is a (possibly qualified) array type.

This can affect how we format the output string.

Definition at line 137 of file ItaniumDemangle.h.

Referenced by hasArray(), and ParameterPack::ParameterPack().

◆ FunctionCache

Cache Node::FunctionCache

Track if this node is a (possibly qualified) function type.

This can affect how we format the output string.

Definition at line 141 of file ItaniumDemangle.h.

Referenced by hasFunction(), and ParameterPack::ParameterPack().

◆ RHSComponentCache

Cache Node::RHSComponentCache

Tracks if this node has a component on its right side, in which case we need to call printRight.

Definition at line 133 of file ItaniumDemangle.h.

Referenced by hasRHSComponent(), ParameterPack::ParameterPack(), and print().


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