clang API Documentation
#include <Mangle.h>

Public Member Functions | |
| MangleContext (ASTContext &Context, Diagnostic &Diags) | |
| virtual | ~MangleContext () |
| ASTContext & | getASTContext () const |
| Diagnostic & | getDiags () const |
| void | startNewFunction () |
| uint64_t | getAnonymousStructId (const TagDecl *TD) |
| unsigned | getBlockId (const BlockDecl *BD, bool Local) |
Mangler Entry Points | |
| virtual bool | shouldMangleDeclName (const NamedDecl *D) |
| virtual void | mangleName (const NamedDecl *D, llvm::SmallVectorImpl< char > &) |
| Mangles the name of the declaration D and emits that name to the given output stream. | |
| virtual void | mangleThunk (const CXXMethodDecl *MD, const ThunkInfo &Thunk, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXDtorThunk (const CXXDestructorDecl *DD, CXXDtorType Type, const ThisAdjustment &ThisAdjustment, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleReferenceTemporary (const VarDecl *D, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXVTable (const CXXRecordDecl *RD, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXVTT (const CXXRecordDecl *RD, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXCtorVTable (const CXXRecordDecl *RD, int64_t Offset, const CXXRecordDecl *Type, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXRTTI (QualType T, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXRTTIName (QualType T, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXCtor (const CXXConstructorDecl *D, CXXCtorType Type, llvm::SmallVectorImpl< char > &) |
| virtual void | mangleCXXDtor (const CXXDestructorDecl *D, CXXDtorType Type, llvm::SmallVectorImpl< char > &) |
| void | mangleBlock (GlobalDecl GD, const BlockDecl *BD, llvm::SmallVectorImpl< char > &) |
| void | mangleItaniumGuardVariable (const VarDecl *D, llvm::SmallVectorImpl< char > &) |
| void | mangleInitDiscriminator () |
| bool | getNextDiscriminator (const NamedDecl *ND, unsigned &disc) |
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangler.
Definition at line 73 of file Mangle.h.
| clang::CodeGen::MangleContext::MangleContext | ( | ASTContext & | Context, | |
| Diagnostic & | Diags | |||
| ) | [inline, explicit] |
| virtual clang::CodeGen::MangleContext::~MangleContext | ( | ) | [inline, virtual] |
| uint64_t clang::CodeGen::MangleContext::getAnonymousStructId | ( | const TagDecl * | TD | ) | [inline] |
| ASTContext& clang::CodeGen::MangleContext::getASTContext | ( | ) | const [inline] |
Definition at line 90 of file Mangle.h.
Referenced by mangleName(), and shouldMangleDeclName().
| unsigned clang::CodeGen::MangleContext::getBlockId | ( | const BlockDecl * | BD, | |
| bool | Local | |||
| ) | [inline] |
| Diagnostic& clang::CodeGen::MangleContext::getDiags | ( | ) | const [inline] |
| bool clang::CodeGen::MangleContext::getNextDiscriminator | ( | const NamedDecl * | ND, | |
| unsigned & | disc | |||
| ) | [inline] |
| void MangleContext::mangleBlock | ( | GlobalDecl | GD, | |
| const BlockDecl * | BD, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) |
Definition at line 2499 of file Mangle.cpp.
References clang::CodeGen::MiscNameMangler::mangleBlock().
Referenced by clang::CodeGen::CodeGenModule::getMangledName().
| void MangleContext::mangleCXXCtor | ( | const CXXConstructorDecl * | D, | |
| CXXCtorType | Type, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2487 of file Mangle.cpp.
Referenced by clang::CodeGen::CodeGenModule::getMangledName().
| void MangleContext::mangleCXXCtorVTable | ( | const CXXRecordDecl * | RD, | |
| int64_t | Offset, | |||
| const CXXRecordDecl * | Type, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2587 of file Mangle.cpp.
| void MangleContext::mangleCXXDtor | ( | const CXXDestructorDecl * | D, | |
| CXXDtorType | Type, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2493 of file Mangle.cpp.
Referenced by clang::CodeGen::CodeGenModule::getMangledName().
| void MangleContext::mangleCXXDtorThunk | ( | const CXXDestructorDecl * | DD, | |
| CXXDtorType | Type, | |||
| const ThisAdjustment & | ThisAdjustment, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2535 of file Mangle.cpp.
References clang::CodeGen::ThisAdjustment::NonVirtual, and clang::CodeGen::ThisAdjustment::VCallOffsetOffset.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfThunk().
| void MangleContext::mangleCXXRTTI | ( | QualType | T, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2599 of file Mangle.cpp.
References clang::QualType::hasQualifiers().
| void MangleContext::mangleCXXRTTIName | ( | QualType | T, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2608 of file Mangle.cpp.
Referenced by clang::CodeGen::CodeGenTBAA::getTBAAInfo().
| void MangleContext::mangleCXXVTable | ( | const CXXRecordDecl * | RD, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2571 of file Mangle.cpp.
Referenced by clang::CodeGen::CodeGenVTables::GetAddrOfVTable().
| void MangleContext::mangleCXXVTT | ( | const CXXRecordDecl * | RD, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2579 of file Mangle.cpp.
| void clang::CodeGen::MangleContext::mangleInitDiscriminator | ( | ) | [inline] |
| void MangleContext::mangleItaniumGuardVariable | ( | const VarDecl * | D, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) |
mangleGuardVariable - Returns the mangled name for a guard variable for the passed in VarDecl.
Definition at line 2553 of file Mangle.cpp.
| void MangleContext::mangleName | ( | const NamedDecl * | D, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Mangles the name of the declaration D and emits that name to the given output stream.
If the declaration D requires a mangled name, this routine will emit that mangled name to os and return true. Otherwise, os will be unchanged and this routine will return false. In this case, the caller should just emit the identifier of the declaration (D->getIdentifier()) as its name.
Definition at line 2472 of file Mangle.cpp.
References getASTContext().
Referenced by clang::CodeGen::CodeGenModule::getMangledName().
| void MangleContext::mangleReferenceTemporary | ( | const VarDecl * | D, | |
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2562 of file Mangle.cpp.
Referenced by CreateReferenceTemporary().
| void MangleContext::mangleThunk | ( | const CXXMethodDecl * | MD, | |
| const ThunkInfo & | Thunk, | |||
| llvm::SmallVectorImpl< char > & | Res | |||
| ) | [virtual] |
Definition at line 2505 of file Mangle.cpp.
References clang::CodeGen::ReturnAdjustment::isEmpty(), clang::CodeGen::ReturnAdjustment::NonVirtual, clang::CodeGen::ThisAdjustment::NonVirtual, clang::CodeGen::ThunkInfo::Return, clang::CodeGen::ThunkInfo::This, clang::CodeGen::ReturnAdjustment::VBaseOffsetOffset, and clang::CodeGen::ThisAdjustment::VCallOffsetOffset.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfThunk().
| bool MangleContext::shouldMangleDeclName | ( | const NamedDecl * | D | ) | [virtual] |
Definition at line 275 of file Mangle.cpp.
References clang::LangOptions::CPlusPlus, clang::frontend::CPlusPlus, getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ASTContext::getLangOptions(), clang::NamedDecl::getLinkage(), clang::DeclContext::getParent(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::NamedDecl::hasLinkage(), clang::InternalLinkage, clang::DeclContext::isFunctionOrMethod(), clang::DeclarationName::isIdentifier(), isInCLinkageSpecification(), clang::FunctionDecl::isMain(), clang::DeclContext::isNamespace(), clang::DeclContext::isRecord(), and clang::DeclContext::isTranslationUnit().
Referenced by clang::CodeGen::CodeGenModule::getMangledName().
| void clang::CodeGen::MangleContext::startNewFunction | ( | ) | [inline] |
Definition at line 94 of file Mangle.h.
Referenced by clang::CodeGen::CodeGenFunction::CodeGenFunction().