LLVM
13.0.0git
|
#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.
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 Node * | getSyntaxNode (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... | |
Definition at line 114 of file ItaniumDemangle.h.
|
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.
enum Node::Kind : unsigned char |
Definition at line 116 of file ItaniumDemangle.h.
|
inline |
Definition at line 144 of file ItaniumDemangle.h.
|
virtualdefault |
DEMANGLE_DUMP_METHOD void Node::dump | ( | ) | const |
Referenced by llvm::SDValue::dump().
|
inlinevirtual |
Reimplemented in SpecialSubstitution, ExpandedSpecialSubstitution, StdQualifiedName, GlobalQualifiedName, NameWithTemplateArgs, QualifiedName, NestedName, and NameType.
Definition at line 203 of file ItaniumDemangle.h.
Referenced by NestedName::getBaseName(), NameWithTemplateArgs::getBaseName(), and StdQualifiedName::getBaseName().
|
inline |
Definition at line 176 of file ItaniumDemangle.h.
Referenced by ObjCProtoName::isObjCObject(), AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseCtorDtorName(), AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseTemplateParam(), BracedExpr::printLeft(), and BracedRangeExpr::printLeft().
|
inlinevirtual |
Reimplemented in ForwardTemplateReference, and ParameterPack.
Definition at line 184 of file ItaniumDemangle.h.
Referenced by ForwardTemplateReference::getSyntaxNode().
|
inline |
Definition at line 164 of file ItaniumDemangle.h.
References ArrayCache, hasArraySlow(), S, Unknown, and Yes.
Referenced by QualType::hasArraySlow(), ForwardTemplateReference::hasArraySlow(), PointerToMemberType::printLeft(), and PointerToMemberType::printRight().
|
inlinevirtual |
Reimplemented in ForwardTemplateReference, ParameterPack, QualType, and ArrayType.
Definition at line 179 of file ItaniumDemangle.h.
Referenced by hasArray().
|
inline |
Definition at line 170 of file ItaniumDemangle.h.
References FunctionCache, hasFunctionSlow(), S, Unknown, and Yes.
Referenced by QualType::hasFunctionSlow(), ForwardTemplateReference::hasFunctionSlow(), PointerToMemberType::printLeft(), and PointerToMemberType::printRight().
|
inlinevirtual |
Reimplemented in ForwardTemplateReference, ParameterPack, QualType, FunctionEncoding, and FunctionType.
Definition at line 180 of file ItaniumDemangle.h.
Referenced by hasFunction().
|
inline |
Definition at line 158 of file ItaniumDemangle.h.
References hasRHSComponentSlow(), RHSComponentCache, S, Unknown, and Yes.
Referenced by QualType::hasRHSComponentSlow(), ReferenceType::hasRHSComponentSlow(), PointerToMemberType::hasRHSComponentSlow(), and ForwardTemplateReference::hasRHSComponentSlow().
|
inlinevirtual |
Reimplemented in ForwardTemplateReference, ParameterPack, PointerToMemberType, ReferenceType, PointerType, QualType, FunctionEncoding, FunctionType, and ArrayType.
Definition at line 178 of file ItaniumDemangle.h.
Referenced by hasRHSComponent().
|
inline |
Definition at line 188 of file ItaniumDemangle.h.
References No, printLeft(), printRight(), RHSComponentCache, and S.
Referenced by ElaboratedTypeSpefType::printLeft(), ObjCProtoName::printLeft(), SpecialName::printLeft(), CtorVtableSpecialName::printLeft(), NestedName::printLeft(), LocalName::printLeft(), NameWithTemplateArgs::printLeft(), StdQualifiedName::printLeft(), BinaryExpr::printLeft(), ArraySubscriptExpr::printLeft(), PostfixExpr::printLeft(), MemberExpr::printLeft(), SubobjectExpr::printLeft(), EnclosingExpr::printLeft(), PrefixExpr::printLeft(), PointerToMemberConversionExpr::printLeft(), InitListExpr::printLeft(), BracedExpr::printLeft(), BracedRangeExpr::printLeft(), FoldExpr::printLeft(), EnumLiteral::printLeft(), FunctionType::printRight(), and NodeArray::printWithComma().
|
pure virtual |
Implemented in FloatLiteralImpl< Float >, IntegerLiteral, EnumLiteral, LambdaExpr, StringLiteral, BoolExpr, ThrowExpr, FoldExpr, BracedRangeExpr, BracedExpr, InitListExpr, PointerToMemberConversionExpr, ConversionExpr, FunctionParam, PrefixExpr, DeleteExpr, NewExpr, CallExpr, SizeofParamPackExpr, CastExpr, EnclosingExpr, SubobjectExpr, MemberExpr, ConditionalExpr, PostfixExpr, ArraySubscriptExpr, BinaryExpr, StructuredBindingName, ClosureTypeName, UnnamedTypeName, DtorName, CtorDtorName, SpecialSubstitution, ExpandedSpecialSubstitution, StdQualifiedName, GlobalQualifiedName, NameWithTemplateArgs, ForwardTemplateReference, TemplateArgs, ParameterPackExpansion, TemplateArgumentPack, ParameterPack, TemplateParamPackDecl, TemplateTemplateParamDecl, NonTypeTemplateParamDecl, TypeTemplateParamDecl, SyntheticTemplateParamName, PixelVectorType, VectorType, QualifiedName, LocalName, NestedName, CtorVtableSpecialName, SpecialName, LiteralOperator, FunctionEncoding, DynamicExceptionSpec, NoexceptSpec, FunctionType, ArrayType, PointerToMemberType, ReferenceType, PointerType, ObjCProtoName, EnableIfAttr, AbiTagAttr, ElaboratedTypeSpefType, NameType, PostfixQualifiedType, ConversionOperatorType, QualType, VendorExtQualType, DotSuffix, and NodeArrayNode.
Referenced by print(), QualType::printLeft(), AbiTagAttr::printLeft(), PointerToMemberType::printLeft(), ForwardTemplateReference::printLeft(), DtorName::printLeft(), and CastExpr::printLeft().
|
inlinevirtual |
Reimplemented in ForwardTemplateReference, ParameterPack, TemplateParamPackDecl, TemplateTemplateParamDecl, NonTypeTemplateParamDecl, TypeTemplateParamDecl, FunctionEncoding, FunctionType, ArrayType, PointerToMemberType, ReferenceType, PointerType, and QualType.
Definition at line 201 of file ItaniumDemangle.h.
Referenced by print(), QualType::printRight(), PointerToMemberType::printRight(), and ForwardTemplateReference::printRight().
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.
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().
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().
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().