diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 12:33:58 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-27 12:33:58 +0000 |
| commit | a3b85c9737b509fd2a792b65aa2365b9bcc9fe6a (patch) | |
| tree | 829577514fc4f0436e61c523eb1082afe891bcbf /src/codegen/codegen_stmt.c | |
| parent | b40fc44f799b4810981d37d9030ca69d768cc0b2 (diff) | |
Support for more attributes
Diffstat (limited to 'src/codegen/codegen_stmt.c')
| -rw-r--r-- | src/codegen/codegen_stmt.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |
