{
ir_function *self;
self = (ir_function*)mem_a(sizeof(*self));
+ self->name = NULL;
if (!ir_function_set_name(self, "<@unnamed>")) {
mem_d(self);
return NULL;
{
ir_block *self;
self = (ir_block*)mem_a(sizeof(*self));
+ self->label = NULL;
if (!ir_block_set_label(self, name)) {
mem_d(self);
return NULL;
MEM_VECTOR_INIT(self, instr);
MEM_VECTOR_INIT(self, entries);
MEM_VECTOR_INIT(self, exits);
- self->label = NULL;
self->eid = 0;
self->is_return = false;
void ir_block_delete(ir_block* self)
{
size_t i;
- mem_d((void*)self->label);
+ mem_d(self->label);
for (i = 0; i != self->instr_count; ++i)
ir_instr_delete(self->instr[i]);
MEM_VECTOR_CLEAR(self, instr);