LLVM: Node Class Reference (original) (raw)

#include "[llvm/Demangle/ItaniumDemangle.h](ItaniumDemangle%5F8h%5Fsource.html)"

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

Public Types
enum Kind : unsigned char
enum class Cache : unsigned char { Yes, No, Unknown }
Three-way bool to track a cached value. More...
enum class Prec { Primary, Postfix, Unary, Cast, PtrMem, Multiplicative, Additive, Shift, Spaceship, Relational, Equality, And, Xor, Ior, AndIf, OrIf, Conditional, Assign, Comma, Default }
Operator precedence for expression nodes. More...
Public Member Functions
Node (Kind K_, Prec Precedence_=Prec::Primary, Cache RHSComponentCache_=Cache::No, Cache ArrayCache_=Cache::No, Cache FunctionCache_=Cache::No)
Node (Kind K_, Cache RHSComponentCache_, Cache ArrayCache_=Cache::No, Cache FunctionCache_=Cache::No)
template
void visit (Fn F) const
Visit the most-derived object corresponding to this object.
bool hasRHSComponent (OutputBuffer &OB) const
bool hasArray (OutputBuffer &OB) const
bool hasFunction (OutputBuffer &OB) const
Kind getKind () const
Prec getPrecedence () const
Cache getRHSComponentCache () const
Cache getArrayCache () const
Cache getFunctionCache () const
virtual bool hasRHSComponentSlow (OutputBuffer &) const
virtual bool hasArraySlow (OutputBuffer &) const
virtual bool hasFunctionSlow (OutputBuffer &) const
virtual const Node * getSyntaxNode (OutputBuffer &) const
void printAsOperand (OutputBuffer &OB, Prec P=Prec::Default, bool StrictlyWorse=false) const
void print (OutputBuffer &OB) const
virtual void printLeft (OutputBuffer &) const =0
virtual void printRight (OutputBuffer &) const
virtual bool printInitListAsType (OutputBuffer &, const NodeArray &) const
virtual std::string_view getBaseName () const
virtual ~Node ()=default
DEMANGLE_DUMP_METHOD void dump () const
Protected Attributes
Cache RHSComponentCache: 2
Tracks if this node has a component on its right side, in which case we need to call printRight.
Cache ArrayCache: 2
Track if this node is a (possibly qualified) array type.
Cache FunctionCache: 2
Track if this node is a (possibly qualified) function type.

Definition at line 163 of file ItaniumDemangle.h.

Cache

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

Kind

Prec

Operator precedence for expression nodes.

Used to determine required parens in expression emission.

Enumerator
Primary
Postfix
Unary
Cast
PtrMem
Multiplicative
Additive
Shift
Spaceship
Relational
Equality
And
Xor
Ior
AndIf
OrIf
Conditional
Assign
Comma
Default

Definition at line 176 of file ItaniumDemangle.h.

Node() [1/2]

Node() [2/2]

virtual Node::~Node ( ) virtualdefault

dump()

getArrayCache()

Cache Node::getArrayCache ( ) const inline

getBaseName()

virtual std::string_view Node::getBaseName ( ) const inlinevirtual

Reimplemented in NameType, AbiTagAttr, NestedName, MemberLikeFriendName, ModuleEntity, QualifiedName, NameWithTemplateArgs, GlobalQualifiedName, ExpandedSpecialSubstitution, and SpecialSubstitution.

Definition at line 305 of file ItaniumDemangle.h.

Referenced by AbiTagAttr::getBaseName(), NestedName::getBaseName(), MemberLikeFriendName::getBaseName(), ModuleEntity::getBaseName(), and NameWithTemplateArgs::getBaseName().

getFunctionCache()

Cache Node::getFunctionCache ( ) const inline

getKind()

Kind Node::getKind ( ) const inline

Definition at line 255 of file ItaniumDemangle.h.

Referenced by ObjCProtoName::isObjCObject(), AbstractManglingParser< Derived, Alloc >::parseCtorDtorName(), AbstractManglingParser< Derived, Alloc >::parseNestedName(), AbstractManglingParser< Derived, Alloc >::parseTemplateArgs(), AbstractManglingParser< Derived, Alloc >::parseTemplateParam(), AbstractManglingParser< Derived, Alloc >::parseUnscopedName(), NodeArray::printAsString(), BracedExpr::printLeft(), and BracedRangeExpr::printLeft().

getPrecedence()

Prec Node::getPrecedence ( ) const inline

Definition at line 257 of file ItaniumDemangle.h.

Referenced by BinaryExpr::match(), ArraySubscriptExpr::match(), PostfixExpr::match(), ConditionalExpr::match(), MemberExpr::match(), EnclosingExpr::match(), CastExpr::match(), CallExpr::match(), NewExpr::match(), DeleteExpr::match(), PrefixExpr::match(), ConversionExpr::match(), PointerToMemberConversionExpr::match(), printAsOperand(), BinaryExpr::printLeft(), ArraySubscriptExpr::printLeft(), PostfixExpr::printLeft(), ConditionalExpr::printLeft(), MemberExpr::printLeft(), and PrefixExpr::printLeft().

getRHSComponentCache()

Cache Node::getRHSComponentCache ( ) const inline

getSyntaxNode()

hasArray()

hasArraySlow()

hasFunction()

hasFunctionSlow()

hasRHSComponent()

hasRHSComponentSlow()

print()

Definition at line 283 of file ItaniumDemangle.h.

References No, printLeft(), printRight(), and RHSComponentCache.

Referenced by llvm::ItaniumPartialDemangler::getFunctionDeclContextName(), printAsOperand(), ClosureTypeName::printDeclarator(), ElaboratedTypeSpefType::printLeft(), ObjCProtoName::printLeft(), SpecialName::printLeft(), CtorVtableSpecialName::printLeft(), NestedName::printLeft(), MemberLikeFriendName::printLeft(), ModuleName::printLeft(), ModuleEntity::printLeft(), LocalName::printLeft(), TemplateParamQualifiedArg::printLeft(), NameWithTemplateArgs::printLeft(), SubobjectExpr::printLeft(), EnclosingExpr::printLeft(), PointerToMemberConversionExpr::printLeft(), InitListExpr::printLeft(), BracedExpr::printLeft(), BracedRangeExpr::printLeft(), FoldExpr::printLeft(), EnumLiteral::printLeft(), ExprRequirement::printLeft(), NestedRequirement::printLeft(), printNode(), FunctionType::printRight(), FunctionEncoding::printRight(), and TemplateTemplateParamDecl::printRight().

printAsOperand()

Definition at line 272 of file ItaniumDemangle.h.

References getPrecedence(), P, and print().

Referenced by llvm::DOTGraphTraits< DOTFuncInfo * >::getBBName(), getSimpleNodeName(), llvm::operator<<(), llvm::DOTGraphTraits< DOTFuncInfo * >::printBasicBlock(), NoexceptSpec::printLeft(), ArraySubscriptExpr::printLeft(), PostfixExpr::printLeft(), PrefixExpr::printLeft(), FoldExpr::printLeft(), and llvm::SimpleNodeLabelString().

printInitListAsType()

printLeft()

virtual void Node::printLeft ( OutputBuffer & ) const pure virtual

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

Referenced by print(), QualType::printLeft(), AbiTagAttr::printLeft(), PointerToMemberType::printLeft(), ForwardTemplateReference::printLeft(), and CastExpr::printLeft().

printRight()

virtual void Node::printRight ( OutputBuffer & ) const inlinevirtual

Reimplemented in QualType, PointerType, ReferenceType, PointerToMemberType, ArrayType, FunctionType, FunctionEncoding, TypeTemplateParamDecl, ConstrainedTypeTemplateParamDecl, NonTypeTemplateParamDecl, TemplateTemplateParamDecl, TemplateParamPackDecl, ParameterPack, and ForwardTemplateReference.

Definition at line 296 of file ItaniumDemangle.h.

Referenced by print(), QualType::printRight(), PointerToMemberType::printRight(), and ForwardTemplateReference::printRight().

visit()

template

void Node::visit ( Fn F ) const

Visit the most-derived object corresponding to this object.

Visit the node.

Calls [F(P)](MD5%5F8cpp.html#a96d73bbd7af15cb1fc38c3f4a3bd82e9), where P is the node cast to the appropriate derived class.

Definition at line 2621 of file ItaniumDemangle.h.

References DEMANGLE_ASSERT.

ArrayCache

FunctionCache

Cache Node::FunctionCache protected

RHSComponentCache

Cache Node::RHSComponentCache protected

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