LLVM  10.0.0svn
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, ExpandedSpecialSubstitution, FloatLiteralImpl< Float >, FoldExpr, ForwardTemplateReference, FunctionEncoding, FunctionParam, FunctionType, GlobalQualifiedName, InitListExpr, IntegerCastExpr, IntegerLiteral, LiteralOperator, LocalName, MemberExpr, NameType, NameWithTemplateArgs, NestedName, NewExpr, NodeArrayNode, NoexceptSpec, ObjCProtoName, ParameterPack, ParameterPackExpansion, PixelVectorType, PointerToMemberType, PointerType, PostfixExpr, PostfixQualifiedType, PrefixExpr, QualifiedName, QualType, ReferenceType, SizeofParamPackExpr, SpecialName, SpecialSubstitution, StdQualifiedName, StructuredBindingName, TemplateArgs, TemplateArgumentPack, ThrowExpr, UnnamedTypeName, UUIDOfExpr, 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 106 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 116 of file ItaniumDemangle.h.

◆ Kind

Definition at line 108 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 136 of file ItaniumDemangle.h.

References F(), and visit().

◆ ~Node()

virtual Node::~Node ( )
virtualdefault

Referenced by getBaseName().

Member Function Documentation

◆ dump()

DEMANGLE_DUMP_METHOD void Node::dump ( ) const

Referenced by llvm::SDValue::dump(), and getBaseName().

◆ 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 176 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, ArrayType, and QualType.

Definition at line 171 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, FunctionEncoding, FunctionType, and QualType.

Definition at line 172 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 2016 of file ItaniumDemangle.h.

References assert(), CASE, and FOR_EACH_NODE_KIND.

Referenced by Node().

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 129 of file ItaniumDemangle.h.

Referenced by 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 133 of file ItaniumDemangle.h.

Referenced by 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 125 of file ItaniumDemangle.h.

Referenced by ParameterPack::ParameterPack().


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