Use "##" to ensure the names of the accumulated functions are striped by the IR.

This commit is contained in:
Dale Weiler 2013-10-17 03:47:26 -04:00
parent cfea900afd
commit 05ac126d6f

View file

@ -4007,7 +4007,7 @@ static bool parse_function_body(parser_t *parser, ast_value *var)
} }
/* generate a new name increasing the accumulation count*/ /* generate a new name increasing the accumulation count*/
util_snprintf(acname, sizeof(acname), "$ACCUMULATE_%s_%d", var->name, var->constval.vfunc->accumulation++); util_snprintf(acname, sizeof(acname), "##ACCUMULATE_%s_%d", var->name, var->constval.vfunc->accumulation++);
accum = ast_value_new(parser_ctx(parser), acname, ((ast_expression*)var)->vtype); accum = ast_value_new(parser_ctx(parser), acname, ((ast_expression*)var)->vtype);
if (!accum) if (!accum)
return false; return false;