mem_d(self);
}
-void ast_value_set_name(ast_value *self, const char *name)
+bool ast_value_set_name(ast_value *self, const char *name)
{
if (self->name)
mem_d((void*)self->name);
self->name = util_strdup(name);
+ return !!self->name;
}
ast_binary* ast_binary_new(lex_ctx_t ctx, int op,
ast_value* ast_value_new(lex_ctx_t ctx, const char *name, int qctype, bool keep);
void ast_value_delete(ast_value*);
-void ast_value_set_name(ast_value*, const char *name);
+bool ast_value_set_name(ast_value*, const char *name);
bool ast_value_codegen(ast_value*, ast_function*, ir_value**);