LLVM  8.0.1
Public Member Functions | List of all members
llvm::ItaniumPartialDemangler Struct Reference

"Partial" demangler. More...

#include "llvm/Demangle/Demangle.h"

Public Member Functions

 ItaniumPartialDemangler ()
 
 ItaniumPartialDemangler (ItaniumPartialDemangler &&Other)
 
ItaniumPartialDemangleroperator= (ItaniumPartialDemangler &&Other)
 
bool partialDemangle (const char *MangledName)
 Demangle into an AST. More...
 
charfinishDemangle (char *Buf, size_t *N) const
 Just print the entire mangled name into Buf. More...
 
chargetFunctionBaseName (char *Buf, size_t *N) const
 Get the base name of a function. More...
 
chargetFunctionDeclContextName (char *Buf, size_t *N) const
 Get the context name for a function. More...
 
chargetFunctionName (char *Buf, size_t *N) const
 Get the entire name of this function. More...
 
chargetFunctionParameters (char *Buf, size_t *N) const
 Get the parameters for this function. More...
 
chargetFunctionReturnType (char *Buf, size_t *N) const
 
bool hasFunctionQualifiers () const
 If this function has any any cv or reference qualifiers. More...
 
bool isCtorOrDtor () const
 If this symbol describes a constructor or destructor. More...
 
bool isFunction () const
 If this symbol describes a function. More...
 
bool isData () const
 If this symbol describes a variable. More...
 
bool isSpecialName () const
 If this symbol is a <special-name>. More...
 
 ~ItaniumPartialDemangler ()
 

Detailed Description

"Partial" demangler.

This supports demangling a string into an AST (typically an intermediate stage in itaniumDemangle) and querying certain properties or partially printing the demangled name.

Definition at line 42 of file Demangle.h.

Constructor & Destructor Documentation

◆ ItaniumPartialDemangler() [1/2]

ItaniumPartialDemangler::ItaniumPartialDemangler ( )

Definition at line 359 of file ItaniumDemangle.cpp.

◆ ItaniumPartialDemangler() [2/2]

ItaniumPartialDemangler::ItaniumPartialDemangler ( ItaniumPartialDemangler &&  Other)

Definition at line 366 of file ItaniumDemangle.cpp.

References operator=(), and Other.

◆ ~ItaniumPartialDemangler()

ItaniumPartialDemangler::~ItaniumPartialDemangler ( )

Definition at line 362 of file ItaniumDemangle.cpp.

Member Function Documentation

◆ finishDemangle()

char * ItaniumPartialDemangler::finishDemangle ( char Buf,
size_t *  N 
) const

Just print the entire mangled name into Buf.

Buf and N behave like the second and third parameters to itaniumDemangle.

Definition at line 519 of file ItaniumDemangle.cpp.

References assert(), and printNode().

◆ getFunctionBaseName()

char * ItaniumPartialDemangler::getFunctionBaseName ( char Buf,
size_t *  N 
) const

Get the base name of a function.

This doesn't include trailing template arguments, ie for "a::b<int>" this function returns "b".

Definition at line 399 of file ItaniumDemangle.cpp.

References llvm::itanium_demangle::Node::getKind(), getName(), isFunction(), Name, and printNode().

◆ getFunctionDeclContextName()

char * ItaniumPartialDemangler::getFunctionDeclContextName ( char Buf,
size_t *  N 
) const

◆ getFunctionName()

char * ItaniumPartialDemangler::getFunctionName ( char Buf,
size_t *  N 
) const

Get the entire name of this function.

Definition at line 474 of file ItaniumDemangle.cpp.

References getName(), isFunction(), Name, and printNode().

◆ getFunctionParameters()

char * ItaniumPartialDemangler::getFunctionParameters ( char Buf,
size_t *  N 
) const

◆ getFunctionReturnType()

char * ItaniumPartialDemangler::getFunctionReturnType ( char Buf,
size_t *  N 
) const

◆ hasFunctionQualifiers()

bool ItaniumPartialDemangler::hasFunctionQualifiers ( ) const

If this function has any any cv or reference qualifiers.

These imply that the function is a non-static member function.

Definition at line 524 of file ItaniumDemangle.cpp.

References assert(), E, llvm::itanium_demangle::FrefQualNone, isFunction(), and llvm::itanium_demangle::QualNone.

◆ isCtorOrDtor()

bool ItaniumPartialDemangler::isCtorOrDtor ( ) const

If this symbol describes a constructor or destructor.

Definition at line 532 of file ItaniumDemangle.cpp.

References llvm::itanium_demangle::Node::getKind(), getName(), N, and Name.

◆ isData()

bool ItaniumPartialDemangler::isData ( ) const

If this symbol describes a variable.

Definition at line 576 of file ItaniumDemangle.cpp.

References isFunction(), and isSpecialName().

◆ isFunction()

bool ItaniumPartialDemangler::isFunction ( ) const

◆ isSpecialName()

bool ItaniumPartialDemangler::isSpecialName ( ) const

If this symbol is a <special-name>.

These are generally implicitly generated by the implementation, such as vtables and typeinfo names.

Definition at line 570 of file ItaniumDemangle.cpp.

References assert().

Referenced by isData().

◆ operator=()

ItaniumPartialDemangler & ItaniumPartialDemangler::operator= ( ItaniumPartialDemangler &&  Other)

Definition at line 373 of file ItaniumDemangle.cpp.

References Other, and std::swap().

Referenced by ItaniumPartialDemangler().

◆ partialDemangle()

bool ItaniumPartialDemangler::partialDemangle ( const char MangledName)

Demangle into an AST.

Subsequent calls to the rest of the member functions implicitly operate on the AST this produces.

Returns
true on error, false otherwise

Definition at line 380 of file ItaniumDemangle.cpp.

References llvm::itanium_demangle::AbstractManglingParser< Derived, Alloc >::parse(), and llvm::itanium_demangle::AbstractManglingParser< Derived, Alloc >::reset().


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