Example #1
0
void EnumDeclaration::toDebug()
{
    //printf("EnumDeclaration::toDebug('%s')\n", toChars());

    assert(config.fulltypes >= CV4);

    // If it is a member, it is handled by cvMember()
    if (!isMember())
    {
	unsigned length;
	const char *id = toPrettyChars();
	idx_t typidx = cv4_Denum(this);
	unsigned len = strlen(id);
	unsigned char *debsym = (unsigned char *) alloca(39 + IDOHD + len);

	// Output a 'user-defined type' for the tag name
	TOWORD(debsym + 2,S_UDT);
	TOIDX(debsym + 4,typidx);
	length = 2 + 2 + cgcv.sz_idx;
	length += cv_namestring(debsym + length,id);
	TOWORD(debsym,length - 2);

	assert(length <= 40 + len);
	obj_write_bytes(SegData[DEBSYM],length,debsym);
    }
}
Example #2
0
int EnumDeclaration::cvMember(unsigned char *p)
{
    char *id;
    idx_t typidx;
    int nwritten = 0;

    //printf("EnumDeclaration::cvMember() '%s'\n", toChars());
    id = toChars();

    if (!p)
    {
        nwritten = 4 + cv_stringbytes(id);
    }
    else
    {
        TOWORD(p,LF_NESTTYPE);
        typidx = cv4_Denum(this);
        TOWORD(p + 2,typidx);
        nwritten = 4 + cv_namestring(p + 4, id);
    }
    return nwritten;
}
Example #3
0
int EnumDeclaration::cvMember(unsigned char *p)
{
    //printf("EnumDeclaration::cvMember() '%s'\n", toChars());

    return ::cvMember(p, toChars(), cv4_Denum(this));
}
Example #4
0
        void visit(EnumDeclaration *ed)
        {
            //printf("EnumDeclaration::cvMember() '%s'\n", d->toChars());

            cvMemberCommon(ed, ed->toChars(), cv4_Denum(ed));
        }