示例#1
0
文件: typinf.cpp 项目: Philpax/ldc
    void visit(TypeInfoAssociativeArrayDeclaration *decl)
    {
        IF_LOG Logger::println("TypeInfoAssociativeArrayDeclaration::llvmDefine() %s", decl->toChars());
        LOG_SCOPE;

        assert(decl->tinfo->ty == Taarray);
        TypeAArray *tc = static_cast<TypeAArray *>(decl->tinfo);

        RTTIBuilder b(Type::typeinfoassociativearray);

        // value typeinfo
        b.push_typeinfo(tc->nextOf());

        // key typeinfo
        b.push_typeinfo(tc->index);

        // finish
        b.finalize(getIrGlobal(decl));
    }
示例#2
0
文件: typinf.cpp 项目: alexrp/ldc
void TypeInfoAssociativeArrayDeclaration::llvmDefine()
{
    Logger::println("TypeInfoAssociativeArrayDeclaration::llvmDefine() %s", toChars());
    LOG_SCOPE;

    assert(tinfo->ty == Taarray);
    TypeAArray *tc = static_cast<TypeAArray *>(tinfo);

    RTTIBuilder b(Type::typeinfoassociativearray);

    // value typeinfo
    b.push_typeinfo(tc->nextOf());

    // key typeinfo
    b.push_typeinfo(tc->index);

#if DMDV2
    // impl typeinfo
    b.push_typeinfo(tc->getImpl()->type);
#endif

    // finish
    b.finalize(ir.irGlobal);
}