commit 6ef434af84cd0e9d22951ea94e86c11698033294
parent 3fa50d654caf65caac49e71c95413020bac914a9
Author: Armin Weigl <tb46305@gmail.com>
Date: Tue, 7 Feb 2023 05:32:08 +0100
gen_function_decl: remove no longer necessary function name generation
Signed-off-by: Armin Weigl <tb46305@gmail.com>
Diffstat:
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/gen.c b/src/gen.c
@@ -3301,16 +3301,8 @@ gen_function_decl(struct gen_context *ctx, const struct declaration *decl)
qdef->exported = decl->exported;
ctx->current = &qdef->func;
- if (func->flags & FN_TEST) {
- qdef->name = gen_name(ctx, "testfunc.%d");
- } else if (func->flags & FN_INIT) {
- qdef->name = gen_name(ctx, "initfunc.%d");
- } else if (func->flags & FN_FINI) {
- qdef->name = gen_name(ctx, "finifunc.%d");
- } else {
- qdef->name = decl->symbol ? xstrdup(decl->symbol)
- : ident_to_sym(&decl->ident);
- }
+ qdef->name = decl->symbol ? xstrdup(decl->symbol)
+ : ident_to_sym(&decl->ident);
struct qbe_statement start_label = {0};
mklabel(ctx, &start_label, "start.%d");