/* generate locals */
for (i = 0; i < self->locals_count; ++i)
{
- if (!ast_local_codegen(self->locals[i], func->ir_func, false))
+ if (!ast_local_codegen(self->locals[i], func->ir_func, false)) {
+ if (opts_debug)
+ asterror(ast_ctx(self), "failed to generate local `%s`", self->locals[i]->name);
return false;
+ }
}
for (i = 0; i < self->exprs_count; ++i)
va_list ap;
int lvl = LVL_WARNING;
- if (!OPTS_WARN(warntype))
+ if (warntype && !OPTS_WARN(warntype))
return false;
if (opts_werror)
ir_value* ir_function_create_local(ir_function *self, const char *name, int vtype, bool param)
{
- ir_value *ve = ir_function_get_local(self, name);
- if (ve) {
+ ir_value *ve;
+
+ /*
+ if (ir_function_get_local(self, name))
return NULL;
- }
+ */
if (param &&
self->locals_count &&