X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Ffilter%2Ffilter-ast.h;h=d7a5674451db2ee8f9872f9134784710b43aba78;hb=48a4000561343808724f7cb5fa8c131877489ccd;hp=29fde10f8c126f7cd430b9a8f498987386801d03;hpb=e4d2f27a74baf6942ac8fcafd5ea53e775ceceb3;p=lttng-tools.git diff --git a/src/common/filter/filter-ast.h b/src/common/filter/filter-ast.h index 29fde10f8..d7a567445 100644 --- a/src/common/filter/filter-ast.h +++ b/src/common/filter/filter-ast.h @@ -17,8 +17,13 @@ */ #include +#include #include +#if defined(__cplusplus) +extern "C" { +#endif + #define printf_debug(fmt, args...) \ do { \ if (filter_parser_debug) \ @@ -98,6 +103,8 @@ struct filter_node { enum node_type type; union { struct { + /* Avoid -Wextern-c-compat warning with clang++. */ + char unused; } unknown; struct { struct filter_node *child; @@ -157,8 +164,8 @@ struct filter_parser_ctx { struct filter_ast *ast; struct cds_list_head allocated_strings; struct ir_op *ir_root; - struct lttng_filter_bytecode_alloc *bytecode; - struct lttng_filter_bytecode_alloc *bytecode_reloc; + struct lttng_bytecode_alloc *bytecode; + struct lttng_bytecode_alloc *bytecode_reloc; }; struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input); @@ -185,4 +192,8 @@ int filter_visitor_ir_validate_string(struct filter_parser_ctx *ctx); int filter_visitor_ir_normalize_glob_patterns(struct filter_parser_ctx *ctx); int filter_visitor_ir_validate_globbing(struct filter_parser_ctx *ctx); +#if defined(__cplusplus) +} +#endif + #endif /* _FILTER_AST_H */