LLVM 17.0.0git
|
"Partial" demangler. More...
#include "llvm/Demangle/Demangle.h"
Public Member Functions | |
ItaniumPartialDemangler () | |
ItaniumPartialDemangler (ItaniumPartialDemangler &&Other) | |
ItaniumPartialDemangler & | operator= (ItaniumPartialDemangler &&Other) |
bool | partialDemangle (const char *MangledName) |
Demangle into an AST. | |
char * | finishDemangle (char *Buf, size_t *N) const |
Just print the entire mangled name into Buf. | |
char * | getFunctionBaseName (char *Buf, size_t *N) const |
Get the base name of a function. | |
char * | getFunctionDeclContextName (char *Buf, size_t *N) const |
Get the context name for a function. | |
char * | getFunctionName (char *Buf, size_t *N) const |
Get the entire name of this function. | |
char * | getFunctionParameters (char *Buf, size_t *N) const |
Get the parameters for this function. | |
char * | getFunctionReturnType (char *Buf, size_t *N) const |
bool | hasFunctionQualifiers () const |
If this function has any any cv or reference qualifiers. | |
bool | isCtorOrDtor () const |
If this symbol describes a constructor or destructor. | |
bool | isFunction () const |
If this symbol describes a function. | |
bool | isData () const |
If this symbol describes a variable. | |
bool | isSpecialName () const |
If this symbol is a <special-name>. | |
~ItaniumPartialDemangler () | |
"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 75 of file Demangle.h.
ItaniumPartialDemangler::ItaniumPartialDemangler | ( | ) |
Definition at line 385 of file ItaniumDemangle.cpp.
References Context.
ItaniumPartialDemangler::ItaniumPartialDemangler | ( | ItaniumPartialDemangler && | Other | ) |
Definition at line 392 of file ItaniumDemangle.cpp.
References Context, and llvm::Other.
ItaniumPartialDemangler::~ItaniumPartialDemangler | ( | ) |
Definition at line 388 of file ItaniumDemangle.cpp.
Just print the entire mangled name into Buf.
Buf and N behave like the second and third parameters to __cxa_demangle.
Definition at line 537 of file ItaniumDemangle.cpp.
References assert(), N, and printNode().
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 423 of file ItaniumDemangle.cpp.
References llvm::sampleprof::Base, getName(), isFunction(), N, Name, and printNode().
Get the context name for a function.
For "a::b::c", this function returns "a::b".
Definition at line 452 of file ItaniumDemangle.cpp.
References llvm::sampleprof::Base, LocalName::Encoding, getName(), isFunction(), N, ModuleEntity::Name, Name, and Node::print().
Get the entire name of this function.
Definition at line 496 of file ItaniumDemangle.cpp.
References getName(), isFunction(), N, Name, and printNode().
Get the parameters for this function.
Definition at line 503 of file ItaniumDemangle.cpp.
References isFunction(), N, and NodeArray::printWithComma().
Definition at line 520 of file ItaniumDemangle.cpp.
References isFunction(), and N.
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 542 of file ItaniumDemangle.cpp.
References assert(), E, FrefQualNone, isFunction(), and QualNone.
bool ItaniumPartialDemangler::isCtorOrDtor | ( | ) | const |
If this symbol describes a constructor or destructor.
Definition at line 550 of file ItaniumDemangle.cpp.
References llvm::sampleprof::Base, getName(), N, and Name.
bool ItaniumPartialDemangler::isData | ( | ) | const |
If this symbol describes a variable.
Definition at line 594 of file ItaniumDemangle.cpp.
References isFunction(), and isSpecialName().
bool ItaniumPartialDemangler::isFunction | ( | ) | const |
If this symbol describes a function.
Definition at line 582 of file ItaniumDemangle.cpp.
References assert().
Referenced by getFunctionBaseName(), getFunctionDeclContextName(), getFunctionName(), getFunctionParameters(), getFunctionReturnType(), hasFunctionQualifiers(), and isData().
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 588 of file ItaniumDemangle.cpp.
References assert().
Referenced by isData().
ItaniumPartialDemangler & ItaniumPartialDemangler::operator= | ( | ItaniumPartialDemangler && | Other | ) |
Definition at line 398 of file ItaniumDemangle.cpp.
References llvm::Other, and std::swap().
Demangle into an AST.
Subsequent calls to the rest of the member functions implicitly operate on the AST this produces.
Definition at line 406 of file ItaniumDemangle.cpp.