harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 268fda8e7a857d53e90961ec244f4c10fac2708f
parent d640112768a02f3e6df835269877c994f5f4abd0
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  2 Aug 2021 15:51:15 +0200

gen: use mktemp for gen_expr_call

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Msrc/gen.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/gen.c b/src/gen.c @@ -227,11 +227,7 @@ gen_expr_call(struct gen_context *ctx, const struct expression *expr) }; struct gen_value rval = gv_void; if (type_dealias(rtype->func.result)->storage != STORAGE_VOID) { - rval = (struct gen_value){ - .kind = GV_TEMP, - .type = rtype->func.result, - .name = gen_name(ctx, "returns.%d"), - }; + rval = mktemp(ctx, rtype->func.result, "returns.%d"); call.out = xcalloc(1, sizeof(struct qbe_value)); *call.out = mkqval(ctx, &rval); }