clang
15.0.0git
|
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangler. More...
#include "clang/AST/Mangle.h"
Public Types | |
enum | ManglerKind { MK_Itanium, MK_Microsoft } |
Public Member Functions | |
ManglerKind | getKind () const |
bool | isAux () const |
MangleContext (ASTContext &Context, DiagnosticsEngine &Diags, ManglerKind Kind, bool IsAux=false) | |
virtual | ~MangleContext () |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiags () const |
virtual void | startNewFunction () |
unsigned | getBlockId (const BlockDecl *BD, bool Local) |
uint64_t | getAnonymousStructId (const NamedDecl *D) |
uint64_t | getAnonymousStructIdForDebugInfo (const NamedDecl *D) |
virtual std::string | getLambdaString (const CXXRecordDecl *Lambda)=0 |
Mangler Entry Points | |
bool | shouldMangleDeclName (const NamedDecl *D) |
virtual bool | shouldMangleCXXName (const NamedDecl *D)=0 |
virtual bool | shouldMangleStringLiteral (const StringLiteral *SL)=0 |
virtual bool | isUniqueInternalLinkageDecl (const NamedDecl *ND) |
virtual void | needsUniqueInternalLinkageNames () |
void | mangleName (GlobalDecl GD, raw_ostream &) |
virtual void | mangleCXXName (GlobalDecl GD, raw_ostream &)=0 |
virtual void | mangleThunk (const CXXMethodDecl *MD, const ThunkInfo &Thunk, raw_ostream &)=0 |
virtual void | mangleCXXDtorThunk (const CXXDestructorDecl *DD, CXXDtorType Type, const ThisAdjustment &ThisAdjustment, raw_ostream &)=0 |
virtual void | mangleReferenceTemporary (const VarDecl *D, unsigned ManglingNumber, raw_ostream &)=0 |
virtual void | mangleCXXRTTI (QualType T, raw_ostream &)=0 |
virtual void | mangleCXXRTTIName (QualType T, raw_ostream &)=0 |
virtual void | mangleStringLiteral (const StringLiteral *SL, raw_ostream &)=0 |
virtual void | mangleMSGuidDecl (const MSGuidDecl *GD, raw_ostream &) |
void | mangleGlobalBlock (const BlockDecl *BD, const NamedDecl *ID, raw_ostream &Out) |
void | mangleCtorBlock (const CXXConstructorDecl *CD, CXXCtorType CT, const BlockDecl *BD, raw_ostream &Out) |
void | mangleDtorBlock (const CXXDestructorDecl *CD, CXXDtorType DT, const BlockDecl *BD, raw_ostream &Out) |
void | mangleBlock (const DeclContext *DC, const BlockDecl *BD, raw_ostream &Out) |
void | mangleObjCMethodName (const ObjCMethodDecl *MD, raw_ostream &OS, bool includePrefixByte=true, bool includeCategoryNamespace=true) |
void | mangleObjCMethodNameAsSourceName (const ObjCMethodDecl *MD, raw_ostream &) |
virtual void | mangleStaticGuardVariable (const VarDecl *D, raw_ostream &)=0 |
virtual void | mangleDynamicInitializer (const VarDecl *D, raw_ostream &)=0 |
virtual void | mangleDynamicAtExitDestructor (const VarDecl *D, raw_ostream &)=0 |
virtual void | mangleSEHFilterExpression (const NamedDecl *EnclosingDecl, raw_ostream &Out)=0 |
virtual void | mangleSEHFinallyBlock (const NamedDecl *EnclosingDecl, raw_ostream &Out)=0 |
virtual void | mangleTypeName (QualType T, raw_ostream &)=0 |
Generates a unique string for an externally visible type for use with TBAA or type uniquing. More... | |
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangler.
|
inlineexplicit |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Definition at line 76 of file Mangle.h.
Referenced by mangleObjCMethodName(), and shouldMangleDeclName().
|
inline |
|
inline |
|
pure virtual |
|
inlinevirtual |
Definition at line 114 of file Mangle.h.
Referenced by shouldMangleDeclName().
void MangleContext::mangleBlock | ( | const DeclContext * | DC, |
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 291 of file Mangle.cpp.
void MangleContext::mangleCtorBlock | ( | const CXXConstructorDecl * | CD, |
CXXCtorType | CT, | ||
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 273 of file Mangle.cpp.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
void MangleContext::mangleDtorBlock | ( | const CXXDestructorDecl * | CD, |
CXXDtorType | DT, | ||
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 282 of file Mangle.cpp.
|
pure virtual |
|
pure virtual |
void MangleContext::mangleGlobalBlock | ( | const BlockDecl * | BD, |
const NamedDecl * | ID, | ||
raw_ostream & | Out | ||
) |
Definition at line 256 of file Mangle.cpp.
|
virtual |
Definition at line 242 of file Mangle.cpp.
void MangleContext::mangleName | ( | GlobalDecl | GD, |
raw_ostream & | Out | ||
) |
Definition at line 141 of file Mangle.cpp.
void MangleContext::mangleObjCMethodName | ( | const ObjCMethodDecl * | MD, |
raw_ostream & | OS, | ||
bool | includePrefixByte = true , |
||
bool | includeCategoryNamespace = true |
||
) |
Definition at line 327 of file Mangle.cpp.
References getASTContext(), clang::ObjCMethodDecl::getCategory(), clang::ObjCMethodDecl::getClassInterface(), clang::Decl::getDeclContext(), clang::NamedDecl::getName(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCRuntime::isGNUFamily(), clang::ObjCMethodDecl::isInstanceMethod(), max(), clang::transformer::name(), and clang::Selector::print().
Referenced by clang::CodeGen::CGObjCRuntime::getSymbolNameForMethod().
void MangleContext::mangleObjCMethodNameAsSourceName | ( | const ObjCMethodDecl * | MD, |
raw_ostream & | Out | ||
) |
Definition at line 384 of file Mangle.cpp.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Generates a unique string for an externally visible type for use with TBAA or type uniquing.
TODO: Extend this to internal types by generating names that are unique across translation units so it can be used with LTO.
Referenced by clang::CodeGen::CodeGenModule::EmitVTableTypeMetadata().
|
inlinevirtual |
Referenced by shouldMangleDeclName().
Definition at line 107 of file Mangle.cpp.
References CCM_Other, clang::CPlusPlus, getASTContext(), getCallingConvMangling(), clang::Decl::getOwningModuleForLinkage(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::NamedDecl::hasExternalFormalLinkage(), isUniqueInternalLinkageDecl(), and shouldMangleCXXName().
|
pure virtual |
|
inlinevirtual |