From a3b85c9737b509fd2a792b65aa2365b9bcc9fe6a Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Tue, 27 Jan 2026 12:33:58 +0000 Subject: Support for more attributes --- src/codegen/codegen_stmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/codegen/codegen_stmt.c') diff --git a/src/codegen/codegen_stmt.c b/src/codegen/codegen_stmt.c index 1679d97..c823b13 100644 --- a/src/codegen/codegen_stmt.c +++ b/src/codegen/codegen_stmt.c @@ -653,7 +653,7 @@ void codegen_node_single(ParserContext *ctx, ASTNode *node, FILE *out) int has_attrs = node->func.constructor || node->func.destructor || node->func.noinline || node->func.unused || node->func.weak || node->func.cold || node->func.hot || node->func.noreturn || - node->func.pure || node->func.section; + node->func.pure || node->func.section || node->func.is_export; if (has_attrs) { fprintf(out, "__attribute__(("); @@ -675,6 +675,7 @@ void codegen_node_single(ParserContext *ctx, ASTNode *node, FILE *out) EMIT_ATTR(node->func.hot, "hot"); EMIT_ATTR(node->func.noreturn, "noreturn"); EMIT_ATTR(node->func.pure, "pure"); + EMIT_ATTR(node->func.is_export, "visibility(\"default\")"); if (node->func.section) { if (!first) -- cgit v1.2.3