Ejemplo n.º 1
0
Archivo: node.c Proyecto: oridb/mc
Node *
genlbl(Srcloc loc)
{
	char buf[128];

	genlblstr(buf, 128, "");
	return mklbl(loc, buf);
}
Ejemplo n.º 2
0
static Node *simpblob(Simp *s, Node *blob, Node ***l, size_t *nl)
{
    Node *n, *d, *r;
    char lbl[128];

    n = mkname(blob->line, genlblstr(lbl, 128));
    d = mkdecl(blob->line, n, blob->expr.type);
    r = mkexpr(blob->line, Ovar, n, NULL);

    d->decl.init = blob;
    d->decl.type = blob->expr.type;
    d->decl.isconst = 1;
    htput(s->globls, d, strdup(lbl));

    r->expr.did = d->decl.did;
    r->expr.type = blob->expr.type;
    r->expr.isconst = 1;

    lappend(l, nl, d);
    return r;
}