dmd.tocsym

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

Authors

Walter Bright

Source: tocsym.d

  • Declaration

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

    Helper

  • Declaration

    Symbol* toSymbol(Dsymbol s);

  • Declaration

    Symbol* toImport(Symbol* sym, Loc loc);

  • Declaration

    Symbol* toImport(Declaration ds);

    Generate import symbol from symbol.

  • Declaration

    Symbol* toThunkSymbol(FuncDeclaration fd, int offset);

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

  • Declaration

    Classsym* fake_classsym(Identifier id);

    Fake a struct symbol.

  • Declaration

    Symbol* toVtblSymbol(ClassDeclaration cd, bool genCsymbol = true);

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

  • Declaration

    Symbol* toInitializer(AggregateDeclaration ad);

    Create the static initializer for the struct/class.

  • Declaration

    Symbol* aaGetSymbol(TypeAArray taa, const(char)* func, int flags);

    Determine the right symbol to look up an associative array element.

    Input: flags 0 don't add value signature 1 add value signature

  • Declaration

    Symbol* toSymbol(StructLiteralExp sle);

  • Declaration

    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.

    Parameters

    ClassDeclaration cd

    C++ class

    Return Value

    symbol of instance of _cpp_type_info_ptr

  • Declaration

    Symbol* toSymbolCppTypeInfo(ClassDeclaration cd);

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

    Parameters

    ClassDeclaration cd

    C++ class

    Return Value

    Symbol of cd's rtti type info

  • Declaration

    Srcpos toSrcpos(Loc loc);

    Converts a Loc to backend Srcpos

    Parameters

    Loc loc

    Source code location

    Return Value

    Srcpos backend struct corresponding to the given location