dmd.tocsym

Convert a D symbol to a symbol the linker understands (with mangled name).

Members

Functions

fake_classsym
Classsym* fake_classsym(Identifier id)

Fake a struct symbol.

toImport
Symbol* toImport(Declaration ds)

Generate import symbol from symbol.

toInitializer
Symbol* toInitializer(AggregateDeclaration ad)

Create the static initializer for the struct/class.

toSrcpos
Srcpos toSrcpos(Loc loc)

Converts a Loc to backend Srcpos

toSymbol
Symbol* toSymbol(Dsymbol s)
toSymbol
Symbol* toSymbol(StructLiteralExp sle)
toSymbol
Symbol* toSymbol(Type t)

Turn a class type into a C Symbol.

toSymbolCpp
Symbol* toSymbolCpp(ClassDeclaration cd)

For C++ class cd, generate an instance of __cpp_type_info_ptr and populate it with a pointer to the C++ type info.

toSymbolCppTypeInfo
Symbol* toSymbolCppTypeInfo(ClassDeclaration cd)

Generate Symbol of C++ type info for C++ class cd.

toSymbolX
Symbol* toSymbolX(Dsymbol ds, const(char)* prefix, SC sclass, type* t, const(char)* suffix)

Helper

toThunkSymbol
Symbol* toThunkSymbol(FuncDeclaration fd, int offset)

Thunks adjust the incoming 'this' pointer by 'offset'.

toVtblSymbol
Symbol* toVtblSymbol(ClassDeclaration cd, bool genCsymbol)

This is accessible via the ClassData, but since it is frequently needed directly (like for rtti comparisons), make it directly accessible.

Meta