clang
7.0.0
|
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 |
MangleContext (ASTContext &Context, DiagnosticsEngine &Diags, ManglerKind Kind) | |
virtual | ~MangleContext () |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiags () const |
virtual void | startNewFunction () |
unsigned | getBlockId (const BlockDecl *BD, bool Local) |
uint64_t | getAnonymousStructId (const TagDecl *TD) |
Mangler Entry Points | |
bool | shouldMangleDeclName (const NamedDecl *D) |
virtual bool | shouldMangleCXXName (const NamedDecl *D)=0 |
virtual bool | shouldMangleStringLiteral (const StringLiteral *SL)=0 |
void | mangleName (const NamedDecl *D, raw_ostream &) |
virtual void | mangleCXXName (const NamedDecl *D, 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 | mangleCXXCtor (const CXXConstructorDecl *D, CXXCtorType Type, raw_ostream &)=0 |
virtual void | mangleCXXDtor (const CXXDestructorDecl *D, CXXDtorType Type, raw_ostream &)=0 |
virtual void | mangleStringLiteral (const StringLiteral *SL, raw_ostream &)=0 |
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 | mangleObjCMethodNameWithoutSize (const ObjCMethodDecl *MD, raw_ostream &) |
void | mangleObjCMethodName (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 |
Definition at line 71 of file Mangle.h.
Referenced by mangleName(), and shouldMangleDeclName().
Definition at line 77 of file Mangle.h.
Referenced by mangleGlobalBlock().
|
inline |
|
inline |
Definition at line 62 of file Mangle.h.
Referenced by clang::ItaniumMangleContext::classof(), and clang::MicrosoftMangleContext::classof().
void MangleContext::mangleBlock | ( | const DeclContext * | DC, |
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 229 of file Mangle.cpp.
void MangleContext::mangleCtorBlock | ( | const CXXConstructorDecl * | CD, |
CXXCtorType | CT, | ||
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 211 of file Mangle.cpp.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Referenced by mangleName().
|
pure virtual |
Referenced by clang::CodeGen::CodeGenFunction::EmitTypeCheck().
|
pure virtual |
Referenced by getTypeIdentifier().
void MangleContext::mangleDtorBlock | ( | const CXXDestructorDecl * | CD, |
CXXDtorType | DT, | ||
const BlockDecl * | BD, | ||
raw_ostream & | Out | ||
) |
Definition at line 220 of file Mangle.cpp.
|
pure virtual |
Referenced by clang::CodeGen::CodeGenFunction::createAtExitStub().
|
pure virtual |
void MangleContext::mangleGlobalBlock | ( | const BlockDecl * | BD, |
const NamedDecl * | ID, | ||
raw_ostream & | Out | ||
) |
Definition at line 194 of file Mangle.cpp.
References getBlockId(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), mangleName(), and shouldMangleDeclName().
void MangleContext::mangleName | ( | const NamedDecl * | D, |
raw_ostream & | Out | ||
) |
Definition at line 123 of file Mangle.cpp.
References clang::Type::castAs(), CCM_Fast, CCM_Other, CCM_RegCall, CCM_Std, CCM_Vector, getASTContext(), clang::Decl::getAttr(), getCallingConvMangling(), clang::TargetInfo::getCXXABI(), clang::TargetInfo::getDataLayout(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::TargetInfo::getPointerWidth(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), mangleCXXName(), mangleObjCMethodName(), clang::TargetCXXABI::Microsoft, and shouldMangleCXXName().
Referenced by mangleGlobalBlock().
void MangleContext::mangleObjCMethodName | ( | const ObjCMethodDecl * | MD, |
raw_ostream & | Out | ||
) |
Definition at line 282 of file Mangle.cpp.
Referenced by mangleName().
void MangleContext::mangleObjCMethodNameWithoutSize | ( | const ObjCMethodDecl * | MD, |
raw_ostream & | OS | ||
) |
Definition at line 265 of file Mangle.cpp.
References clang::Decl::getDeclContext(), clang::NamedDecl::getName(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::isInstanceMethod(), and clang::Selector::print().
|
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::EmitOMPThreadPrivateDecl(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), and isValidBaseType().
Referenced by mangleName(), and shouldMangleDeclName().
Definition at line 99 of file Mangle.cpp.
References CCM_Other, getASTContext(), getCallingConvMangling(), clang::ASTContext::getLangOpts(), clang::Decl::getOwningModuleForLinkage(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::NamedDecl::hasExternalFormalLinkage(), and shouldMangleCXXName().
Referenced by mangleGlobalBlock().
|
pure virtual |
|
inlinevirtual |