From: David Goulet Date: Fri, 25 Jan 2013 17:07:29 +0000 (-0500) Subject: Cleanup: use LTTNG_HIDDEN in lttng-ctl filter lib X-Git-Tag: v2.2.0-rc1~78 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a187da1ab55a90f95fed8a29ed232b344f0d32b2;p=lttng-tools.git Cleanup: use LTTNG_HIDDEN in lttng-ctl filter lib Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/filter/filter-parser.y b/src/lib/lttng-ctl/filter/filter-parser.y index a72fcd04b..6250054a0 100644 --- a/src/lib/lttng-ctl/filter/filter-parser.y +++ b/src/lib/lttng-ctl/filter/filter-parser.y @@ -32,20 +32,22 @@ #include "filter-ast.h" #include "filter-parser.h" -__attribute__((visibility("hidden"))) +#include + +LTTNG_HIDDEN int yydebug; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_parser_debug = 0; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yyparse(struct filter_parser_ctx *parser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex(union YYSTYPE *yyval, struct filter_parser_ctx *parser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex_init_extra(struct filter_parser_ctx *parser_ctx, yyscan_t * ptr_yy_globals); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yylex_destroy(yyscan_t yyparser_ctx); -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void yyrestart(FILE * in_str, yyscan_t parser_ctx); struct gc_string { @@ -62,7 +64,7 @@ static const char *node_type_to_str[] = { [ NODE_UNARY_OP ] = "NODE_UNARY_OP", }; -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN const char *node_type(struct filter_node *node) { if (node->type < NR_NODE_TYPES) @@ -93,7 +95,7 @@ static struct gc_string *gc_string_alloc(struct filter_parser_ctx *parser_ctx, * gsrc will be garbage collected immediately, and gstr might be. * Should only be used to append characters to a string literal or constant. */ -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN struct gc_string *gc_string_append(struct filter_parser_ctx *parser_ctx, struct gc_string *gstr, struct gc_string *gsrc) @@ -123,7 +125,7 @@ struct gc_string *gc_string_append(struct filter_parser_ctx *parser_ctx, return gstr; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src) { lvalp->gs = gc_string_alloc(parser_ctx, strlen(src) + 1); @@ -185,13 +187,13 @@ static struct filter_node *make_op_node(struct filter_parser_ctx *scanner, return node; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void yyerror(struct filter_parser_ctx *parser_ctx, const char *str) { fprintf(stderr, "error %s\n", str); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int yywrap(void) { return 1; @@ -233,13 +235,13 @@ static void filter_ast_free(struct filter_ast *ast) free(ast); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_parser_ctx_append_ast(struct filter_parser_ctx *parser_ctx) { return yyparse(parser_ctx); } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input) { struct filter_parser_ctx *parser_ctx; @@ -281,7 +283,7 @@ cleanup_parser_ctx: return NULL; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void filter_parser_ctx_free(struct filter_parser_ctx *parser_ctx) { int ret; diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c index 52c69567c..39f74591f 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c @@ -27,6 +27,8 @@ #include "filter-ir.h" #include "filter-ast.h" +#include + #ifndef max_t #define max_t(type, a, b) ((type) ((a) > (b) ? (a) : (b))) #endif @@ -497,7 +499,7 @@ int recursive_visit_gen_bytecode(struct filter_parser_ctx *ctx, } } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void filter_bytecode_free(struct filter_parser_ctx *ctx) { free(ctx->bytecode); @@ -506,7 +508,7 @@ void filter_bytecode_free(struct filter_parser_ctx *ctx) ctx->bytecode_reloc = NULL; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_visitor_bytecode_generate(struct filter_parser_ctx *ctx) { int ret; diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c index 84122c904..e1cab3468 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-ir.c @@ -30,6 +30,8 @@ #include "filter-parser.h" #include "filter-ir.h" +#include + static struct ir_op *generate_ir_recursive(struct filter_parser_ctx *ctx, struct filter_node *node, enum ir_side side); @@ -755,14 +757,14 @@ struct ir_op *generate_ir_recursive(struct filter_parser_ctx *ctx, return 0; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN void filter_ir_free(struct filter_parser_ctx *ctx) { filter_free_ir_recursive(ctx->ir_root); ctx->ir_root = NULL; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_visitor_ir_generate(struct filter_parser_ctx *ctx) { struct ir_op *op; diff --git a/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c b/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c index bb9fd12e3..4db5ec93d 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c @@ -30,6 +30,8 @@ #include "filter-parser.h" #include "filter-ir.h" +#include + static int check_bin_op_nesting_recursive(struct ir_op *node, int nesting) { @@ -76,7 +78,7 @@ int check_bin_op_nesting_recursive(struct ir_op *node, int nesting) } } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_visitor_ir_check_binary_op_nesting(struct filter_parser_ctx *ctx) { return check_bin_op_nesting_recursive(ctx->ir_root, 0); diff --git a/src/lib/lttng-ctl/filter/filter-visitor-set-parent.c b/src/lib/lttng-ctl/filter/filter-visitor-set-parent.c index fd895f6f1..bd5e5a343 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-set-parent.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-set-parent.c @@ -29,6 +29,8 @@ #include "filter-ast.h" #include "filter-parser.h" +#include + static int update_child(struct filter_node *parent, struct filter_node *old_child, @@ -133,7 +135,7 @@ int recursive_visit_set_parent(struct filter_node *node, return 0; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_visitor_set_parent(struct filter_parser_ctx *ctx) { return recursive_visit_set_parent(&ctx->ast->root, NULL); diff --git a/src/lib/lttng-ctl/filter/filter-visitor-xml.c b/src/lib/lttng-ctl/filter/filter-visitor-xml.c index 1d14f2eab..d27a3bf0e 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-xml.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-xml.c @@ -29,6 +29,8 @@ #include "filter-ast.h" #include "filter-parser.h" +#include + #define fprintf_dbg(fd, fmt, args...) fprintf(fd, "%s: " fmt, __func__, ## args) static @@ -249,7 +251,7 @@ int recursive_visit_print(struct filter_node *node, FILE *stream, int indent) return 0; } -__attribute__((visibility("hidden"))) +LTTNG_HIDDEN int filter_visitor_print_xml(struct filter_parser_ctx *ctx, FILE *stream, int indent) {