projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: compile libfilter as C++
[lttng-tools.git]
/
src
/
common
/
filter
/
filter-ast.h
diff --git
a/src/common/filter/filter-ast.h
b/src/common/filter/filter-ast.h
index a82e4f6bfd2cb77f21efdc13e045972029e3f157..5033b46ea403a2817b794d3d56ebf3460fb062f9 100644
(file)
--- a/
src/common/filter/filter-ast.h
+++ b/
src/common/filter/filter-ast.h
@@
-20,6
+20,10
@@
#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdint.h>
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
#define printf_debug(fmt, args...) \
do { \
if (filter_parser_debug) \
#define printf_debug(fmt, args...) \
do { \
if (filter_parser_debug) \
@@
-89,6
+93,16
@@
enum ast_link_type {
AST_LINK_BRACKET,
};
AST_LINK_BRACKET,
};
+enum ast_expt_type {
+ AST_EXP_UNKNOWN = 0,
+ AST_EXP_STRING,
+ AST_EXP_CONSTANT,
+ AST_EXP_FLOAT_CONSTANT,
+ AST_EXP_IDENTIFIER,
+ AST_EXP_GLOBAL_IDENTIFIER,
+ AST_EXP_NESTED,
+};
+
struct filter_node {
/*
* Parent node is only set on demand by specific visitor.
struct filter_node {
/*
* Parent node is only set on demand by specific visitor.
@@
-99,20
+113,14
@@
struct filter_node {
enum node_type type;
union {
struct {
enum node_type type;
union {
struct {
+ /* Avoid -Wextern-c-compat warning with clang++. */
+ char unused;
} unknown;
struct {
struct filter_node *child;
} root;
struct {
} unknown;
struct {
struct filter_node *child;
} root;
struct {
- enum {
- AST_EXP_UNKNOWN = 0,
- AST_EXP_STRING,
- AST_EXP_CONSTANT,
- AST_EXP_FLOAT_CONSTANT,
- AST_EXP_IDENTIFIER,
- AST_EXP_GLOBAL_IDENTIFIER,
- AST_EXP_NESTED,
- } type;
+ enum ast_expt_type type;
enum ast_link_type post_op; /* reverse */
enum ast_link_type pre_op; /* forward */
union {
enum ast_link_type post_op; /* reverse */
enum ast_link_type pre_op; /* forward */
union {
@@
-158,8
+166,8
@@
struct filter_parser_ctx {
struct filter_ast *ast;
struct cds_list_head allocated_strings;
struct ir_op *ir_root;
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);
};
struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input);
@@
-186,4
+194,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);
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 */
#endif /* _FILTER_AST_H */
This page took
0.024587 seconds
and
4
git commands to generate.