clang API Documentation

clang::CodeGen::MangleContext Class Reference

#include <Mangle.h>

Collaboration diagram for clang::CodeGen::MangleContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MangleContext (ASTContext &Context, Diagnostic &Diags)
virtual ~MangleContext ()
ASTContextgetASTContext () const
DiagnosticgetDiags () 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)

Detailed Description

MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangler.

Definition at line 73 of file Mangle.h.


Constructor & Destructor Documentation

clang::CodeGen::MangleContext::MangleContext ( ASTContext Context,
Diagnostic Diags 
) [inline, explicit]

Definition at line 84 of file Mangle.h.

virtual clang::CodeGen::MangleContext::~MangleContext (  )  [inline, virtual]

Definition at line 88 of file Mangle.h.


Member Function Documentation

uint64_t clang::CodeGen::MangleContext::getAnonymousStructId ( const TagDecl TD  )  [inline]

Definition at line 96 of file Mangle.h.

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]

Definition at line 103 of file Mangle.h.

Diagnostic& clang::CodeGen::MangleContext::getDiags (  )  const [inline]

Definition at line 92 of file Mangle.h.

bool clang::CodeGen::MangleContext::getNextDiscriminator ( const NamedDecl ND,
unsigned &  disc 
) [inline]

Definition at line 148 of file Mangle.h.

void MangleContext::mangleBlock ( GlobalDecl  GD,
const BlockDecl BD,
llvm::SmallVectorImpl< char > &  Res 
)
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]
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]

Definition at line 144 of file Mangle.h.

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]
bool MangleContext::shouldMangleDeclName ( const NamedDecl D  )  [virtual]
void clang::CodeGen::MangleContext::startNewFunction (  )  [inline]

Definition at line 94 of file Mangle.h.

Referenced by clang::CodeGen::CodeGenFunction::CodeGenFunction().


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