LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
AbstractManglingParser< Derived, Alloc > Struct Template Reference

#include "llvm/Demangle/ItaniumDemangle.h"

Inheritance diagram for AbstractManglingParser< Derived, Alloc >:
Inheritance graph
[legend]

Classes

struct  NameState
 Holds some extra information about a <name> that is being parsed. More...
 
struct  OperatorInfo
 
class  SaveTemplateParams
 
class  ScopedTemplateParamList
 

Public Types

using TemplateParamList = PODSmallVector< Node *, 8 >
 

Public Member Functions

 AbstractManglingParser (const char *First_, const char *Last_)
 
Derived & getDerived ()
 
void reset (const char *First_, const char *Last_)
 
template<class T , class... Args>
Nodemake (Args &&... args)
 
template<class It >
NodeArray makeNodeArray (It begin, It end)
 
NodeArray popTrailingNodeArray (size_t FromPosition)
 
bool consumeIf (std::string_view S)
 
bool consumeIf (char C)
 
char consume ()
 
char look (unsigned Lookahead=0) const
 
size_t numLeft () const
 
std::string_view parseNumber (bool AllowNegative=false)
 
Qualifiers parseCVQualifiers ()
 
bool parsePositiveInteger (size_t *Out)
 
std::string_view parseBareSourceName ()
 
bool parseSeqId (size_t *Out)
 
NodeparseSubstitution ()
 
NodeparseTemplateParam ()
 
NodeparseTemplateParamDecl (TemplateParamList *Params)
 
NodeparseTemplateArgs (bool TagTemplates=false)
 
NodeparseTemplateArg ()
 
bool isTemplateParamDecl ()
 
NodeparseExpr ()
 Parse the <expression> production.
 
NodeparsePrefixExpr (std::string_view Kind, Node::Prec Prec)
 
NodeparseBinaryExpr (std::string_view Kind, Node::Prec Prec)
 
NodeparseIntegerLiteral (std::string_view Lit)
 
NodeparseExprPrimary ()
 
template<class Float >
NodeparseFloatingLiteral ()
 
NodeparseFunctionParam ()
 
NodeparseConversionExpr ()
 
NodeparseBracedExpr ()
 
NodeparseFoldExpr ()
 
NodeparsePointerToMemberConversionExpr (Node::Prec Prec)
 
NodeparseSubobjectExpr ()
 
NodeparseConstraintExpr ()
 
NodeparseRequiresExpr ()
 
NodeparseType ()
 Parse the <type> production.
 
NodeparseFunctionType ()
 
NodeparseVectorType ()
 
NodeparseDecltype ()
 
NodeparseArrayType ()
 
NodeparsePointerToMemberType ()
 
NodeparseClassEnumType ()
 
NodeparseQualifiedType ()
 
NodeparseEncoding (bool ParseParams=true)
 
bool parseCallOffset ()
 
NodeparseSpecialName ()
 
bool resolveForwardTemplateRefs (NameState &State)
 
NodeparseName (NameState *State=nullptr)
 Parse the <name> production>
 
NodeparseLocalName (NameState *State)
 
NodeparseOperatorName (NameState *State)
 
bool parseModuleNameOpt (ModuleName *&Module)
 
NodeparseUnqualifiedName (NameState *State, Node *Scope, ModuleName *Module)
 
NodeparseUnnamedTypeName (NameState *State)
 
NodeparseSourceName (NameState *State)
 
NodeparseUnscopedName (NameState *State, bool *isSubstName)
 
NodeparseNestedName (NameState *State)
 
NodeparseCtorDtorName (Node *&SoFar, NameState *State)
 
NodeparseAbiTags (Node *N)
 
const OperatorInfoparseOperatorEncoding ()
 
NodeparseUnresolvedName (bool Global)
 Parse the <unresolved-name> production.
 
NodeparseSimpleId ()
 
NodeparseBaseUnresolvedName ()
 
NodeparseUnresolvedType ()
 
NodeparseDestructorName ()
 
Nodeparse (bool ParseParams=true)
 Top-level entry point into the parser.
 

Public Attributes

const charFirst
 
const charLast
 
PODSmallVector< Node *, 32 > Names
 
PODSmallVector< Node *, 32 > Subs
 
TemplateParamList OuterTemplateParams
 
PODSmallVector< TemplateParamList *, 4 > TemplateParams
 
PODSmallVector< ForwardTemplateReference *, 4 > ForwardTemplateRefs
 
bool TryToParseTemplateArgs = true
 
bool PermitForwardTemplateReferences = false
 
bool InConstraintExpr = false
 
size_t ParsingLambdaParamsAtLevel = (size_t)-1
 
unsigned NumSyntheticTemplateParameters [3] = {}
 
Alloc ASTAllocator
 

Static Public Attributes

static const OperatorInfo Ops []
 
static const size_t NumOps
 

Detailed Description

template<typename Derived, typename Alloc>
struct AbstractManglingParser< Derived, Alloc >

Definition at line 2607 of file ItaniumDemangle.h.

Member Typedef Documentation

◆ TemplateParamList

template<typename Derived , typename Alloc >
using AbstractManglingParser< Derived, Alloc >::TemplateParamList = PODSmallVector<Node *, 8>

Definition at line 2623 of file ItaniumDemangle.h.

Constructor & Destructor Documentation

◆ AbstractManglingParser()

template<typename Derived , typename Alloc >
AbstractManglingParser< Derived, Alloc >::AbstractManglingParser ( const char First_,
const char Last_ 
)
inline

Definition at line 2687 of file ItaniumDemangle.h.

Member Function Documentation

◆ consume()

template<typename Derived , typename Alloc >
char AbstractManglingParser< Derived, Alloc >::consume ( )
inline

◆ consumeIf() [1/2]

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::consumeIf ( char  C)
inline

◆ consumeIf() [2/2]

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::consumeIf ( std::string_view  S)
inline

◆ getDerived()

template<typename Derived , typename Alloc >
Derived & AbstractManglingParser< Derived, Alloc >::getDerived ( )
inline

Definition at line 2690 of file ItaniumDemangle.h.

◆ isTemplateParamDecl()

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::isTemplateParamDecl ( )
inline

◆ look()

template<typename Derived , typename Alloc >
char AbstractManglingParser< Derived, Alloc >::look ( unsigned  Lookahead = 0) const
inline

◆ make()

template<typename Derived , typename Alloc >
template<class T , class... Args>
Node * AbstractManglingParser< Derived, Alloc >::make ( Args &&...  args)
inline

◆ makeNodeArray()

template<typename Derived , typename Alloc >
template<class It >
NodeArray AbstractManglingParser< Derived, Alloc >::makeNodeArray ( It  begin,
It  end 
)
inline

◆ numLeft()

template<typename Derived , typename Alloc >
size_t AbstractManglingParser< Derived, Alloc >::numLeft ( ) const
inline

◆ parse()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parse ( bool  ParseParams = true)

Top-level entry point into the parser.

Definition at line 5907 of file ItaniumDemangle.h.

◆ parseAbiTags()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseAbiTags ( Node N)

Definition at line 3743 of file ItaniumDemangle.h.

References N.

◆ parseArrayType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseArrayType

Definition at line 3924 of file ItaniumDemangle.h.

◆ parseBareSourceName()

template<typename Alloc , typename Derived >
std::string_view AbstractManglingParser< Alloc, Derived >::parseBareSourceName

Definition at line 3783 of file ItaniumDemangle.h.

References Int.

◆ parseBaseUnresolvedName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseBaseUnresolvedName

Definition at line 3621 of file ItaniumDemangle.h.

◆ parseBinaryExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseBinaryExpr ( std::string_view  Kind,
Node::Prec  Prec 
)

Definition at line 4452 of file ItaniumDemangle.h.

References LHS, and RHS.

◆ parseBracedExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseBracedExpr

Definition at line 4676 of file ItaniumDemangle.h.

References Index.

◆ parseCallOffset()

template<typename Alloc , typename Derived >
bool AbstractManglingParser< Alloc, Derived >::parseCallOffset

Definition at line 5228 of file ItaniumDemangle.h.

◆ parseClassEnumType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseClassEnumType

Definition at line 3970 of file ItaniumDemangle.h.

References Name.

◆ parseConstraintExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseConstraintExpr

Definition at line 4818 of file ItaniumDemangle.h.

◆ parseConversionExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseConversionExpr

◆ parseCtorDtorName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseCtorDtorName ( Node *&  SoFar,
NameState State 
)

◆ parseCVQualifiers()

template<typename Alloc , typename Derived >
Qualifiers AbstractManglingParser< Alloc, Derived >::parseCVQualifiers

Definition at line 4474 of file ItaniumDemangle.h.

References QualConst, QualNone, QualRestrict, and QualVolatile.

◆ parseDecltype()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseDecltype

Definition at line 3908 of file ItaniumDemangle.h.

References E.

◆ parseDestructorName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseDestructorName

Definition at line 3580 of file ItaniumDemangle.h.

◆ parseEncoding()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseEncoding ( bool  ParseParams = true)

◆ parseExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseExpr

◆ parseExprPrimary()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseExprPrimary

Definition at line 4556 of file ItaniumDemangle.h.

References N.

◆ parseFloatingLiteral()

template<typename Alloc , typename Derived >
template<class Float >
Node * AbstractManglingParser< Alloc, Derived >::parseFloatingLiteral

Definition at line 5537 of file ItaniumDemangle.h.

References C, and N.

◆ parseFoldExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseFoldExpr

Definition at line 4723 of file ItaniumDemangle.h.

References std::swap().

◆ parseFunctionParam()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseFunctionParam

Definition at line 4491 of file ItaniumDemangle.h.

◆ parseFunctionType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseFunctionType

◆ parseIntegerLiteral()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseIntegerLiteral ( std::string_view  Lit)

Definition at line 4464 of file ItaniumDemangle.h.

◆ parseLocalName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseLocalName ( NameState State)

Definition at line 2961 of file ItaniumDemangle.h.

References N, and parse_discriminator().

◆ parseModuleNameOpt()

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::parseModuleNameOpt ( ModuleName *&  Module)

Definition at line 3093 of file ItaniumDemangle.h.

References Module, and PODSmallVector< T, N >::push_back().

◆ parseName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseName ( NameState State = nullptr)

◆ parseNestedName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseNestedName ( NameState State)

◆ parseNumber()

template<typename Alloc , typename Derived >
std::string_view AbstractManglingParser< Alloc, Derived >::parseNumber ( bool  AllowNegative = false)

Definition at line 3758 of file ItaniumDemangle.h.

◆ parseOperatorEncoding()

template<typename Derived , typename Alloc >
const AbstractManglingParser< Derived, Alloc >::OperatorInfo * AbstractManglingParser< Derived, Alloc >::parseOperatorEncoding

Definition at line 3316 of file ItaniumDemangle.h.

◆ parseOperatorName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseOperatorName ( NameState State)

◆ parsePointerToMemberConversionExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parsePointerToMemberConversionExpr ( Node::Prec  Prec)

Definition at line 4776 of file ItaniumDemangle.h.

References Offset.

◆ parsePointerToMemberType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parsePointerToMemberType

Definition at line 3953 of file ItaniumDemangle.h.

◆ parsePositiveInteger()

template<typename Alloc , typename Derived >
bool AbstractManglingParser< Alloc, Derived >::parsePositiveInteger ( size_t *  Out)

Definition at line 3771 of file ItaniumDemangle.h.

References consume().

◆ parsePrefixExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parsePrefixExpr ( std::string_view  Kind,
Node::Prec  Prec 
)

Definition at line 4442 of file ItaniumDemangle.h.

References E.

◆ parseQualifiedType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseQualifiedType

Definition at line 3993 of file ItaniumDemangle.h.

References QualNone, and starts_with().

◆ parseRequiresExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseRequiresExpr

◆ parseSeqId()

template<typename Alloc , typename Derived >
bool AbstractManglingParser< Alloc, Derived >::parseSeqId ( size_t *  Out)

Definition at line 5553 of file ItaniumDemangle.h.

◆ parseSimpleId()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseSimpleId

Definition at line 3564 of file ItaniumDemangle.h.

◆ parseSourceName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseSourceName ( NameState State)

Definition at line 3213 of file ItaniumDemangle.h.

References Name, and starts_with().

◆ parseSpecialName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseSpecialName

Definition at line 5261 of file ItaniumDemangle.h.

References Module, and Name.

◆ parseSubobjectExpr()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseSubobjectExpr

◆ parseSubstitution()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseSubstitution

◆ parseTemplateArg()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseTemplateArg

◆ parseTemplateArgs()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseTemplateArgs ( bool  TagTemplates = false)

◆ parseTemplateParam()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseTemplateParam

◆ parseTemplateParamDecl()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseTemplateParamDecl ( TemplateParamList Params)

◆ parseType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseType

Parse the <type> production.

Definition at line 4060 of file ItaniumDemangle.h.

References DEMANGLE_FALLTHROUGH, LValue, P, Ptr, PODSmallVector< T, N >::push_back(), RValue, Signed, and Size.

◆ parseUnnamedTypeName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseUnnamedTypeName ( NameState State)

◆ parseUnqualifiedName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseUnqualifiedName ( NameState State,
Node Scope,
ModuleName Module 
)

◆ parseUnresolvedName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseUnresolvedName ( bool  Global)

Parse the <unresolved-name> production.

Definition at line 3655 of file ItaniumDemangle.h.

References DEMANGLE_ASSERT.

◆ parseUnresolvedType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseUnresolvedType

Definition at line 3595 of file ItaniumDemangle.h.

References PODSmallVector< T, N >::push_back().

◆ parseUnscopedName()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseUnscopedName ( NameState State,
bool isSubstName 
)

Definition at line 3002 of file ItaniumDemangle.h.

References Node::getKind(), and Module.

◆ parseVectorType()

template<typename Derived , typename Alloc >
Node * AbstractManglingParser< Derived, Alloc >::parseVectorType

Definition at line 3871 of file ItaniumDemangle.h.

◆ popTrailingNodeArray()

template<typename Derived , typename Alloc >
NodeArray AbstractManglingParser< Derived, Alloc >::popTrailingNodeArray ( size_t  FromPosition)
inline

◆ reset()

template<typename Derived , typename Alloc >
void AbstractManglingParser< Derived, Alloc >::reset ( const char First_,
const char Last_ 
)
inline

◆ resolveForwardTemplateRefs()

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::resolveForwardTemplateRefs ( NameState State)
inline

Member Data Documentation

◆ ASTAllocator

template<typename Derived , typename Alloc >
Alloc AbstractManglingParser< Derived, Alloc >::ASTAllocator

◆ First

template<typename Derived , typename Alloc >
const char* AbstractManglingParser< Derived, Alloc >::First

◆ ForwardTemplateRefs

template<typename Derived , typename Alloc >
PODSmallVector<ForwardTemplateReference *, 4> AbstractManglingParser< Derived, Alloc >::ForwardTemplateRefs

◆ InConstraintExpr

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::InConstraintExpr = false

Definition at line 2680 of file ItaniumDemangle.h.

◆ Last

template<typename Derived , typename Alloc >
const char* AbstractManglingParser< Derived, Alloc >::Last

◆ Names

template<typename Derived , typename Alloc >
PODSmallVector<Node *, 32> AbstractManglingParser< Derived, Alloc >::Names

◆ NumOps

template<typename Derived , typename Alloc >
const size_t AbstractManglingParser< Derived, Alloc >::NumOps
static
Initial value:
= sizeof(Ops) /
sizeof(Ops[0])
static const OperatorInfo Ops[]

Definition at line 2901 of file ItaniumDemangle.h.

◆ NumSyntheticTemplateParameters

template<typename Derived , typename Alloc >
unsigned AbstractManglingParser< Derived, Alloc >::NumSyntheticTemplateParameters[3] = {}

Definition at line 2683 of file ItaniumDemangle.h.

Referenced by AbstractManglingParser< Derived, Alloc >::reset().

◆ Ops

template<typename Derived , typename Alloc >
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops
static

Definition at line 2900 of file ItaniumDemangle.h.

◆ OuterTemplateParams

template<typename Derived , typename Alloc >
TemplateParamList AbstractManglingParser< Derived, Alloc >::OuterTemplateParams

◆ ParsingLambdaParamsAtLevel

template<typename Derived , typename Alloc >
size_t AbstractManglingParser< Derived, Alloc >::ParsingLambdaParamsAtLevel = (size_t)-1

Definition at line 2681 of file ItaniumDemangle.h.

Referenced by AbstractManglingParser< Derived, Alloc >::reset().

◆ PermitForwardTemplateReferences

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::PermitForwardTemplateReferences = false

Definition at line 2679 of file ItaniumDemangle.h.

Referenced by AbstractManglingParser< Derived, Alloc >::reset().

◆ Subs

template<typename Derived , typename Alloc >
PODSmallVector<Node *, 32> AbstractManglingParser< Derived, Alloc >::Subs

Definition at line 2619 of file ItaniumDemangle.h.

Referenced by AbstractManglingParser< Derived, Alloc >::reset().

◆ TemplateParams

template<typename Derived , typename Alloc >
PODSmallVector<TemplateParamList *, 4> AbstractManglingParser< Derived, Alloc >::TemplateParams

◆ TryToParseTemplateArgs

template<typename Derived , typename Alloc >
bool AbstractManglingParser< Derived, Alloc >::TryToParseTemplateArgs = true

Definition at line 2678 of file ItaniumDemangle.h.

Referenced by AbstractManglingParser< Derived, Alloc >::reset().


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