X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-grammar-test.c;h=70656e1a84f42f87b1b0a35bb1579f2b15e908c9;hp=2804053cf29ceae93cfc3ce0a2a9b0d23a48922a;hb=606757e482b9fb6282c5a63fb888942424f9d5c5;hpb=9642d9bf3d80d6a45ecdd107ff12c676b5ef0870 diff --git a/src/lib/lttng-ctl/filter/filter-grammar-test.c b/src/lib/lttng-ctl/filter/filter-grammar-test.c index 2804053cf..70656e1a8 100644 --- a/src/lib/lttng-ctl/filter/filter-grammar-test.c +++ b/src/lib/lttng-ctl/filter/filter-grammar-test.c @@ -41,6 +41,22 @@ int main(int argc, char **argv) print_bytecode = 1; } + /* + * Force generate the bytecode if the user asks to print the bytecode + * (can't print it without generating it first). + */ + if (print_bytecode) { + generate_bytecode = 1; + } + + /* + * Force generate the IR if the user asks to generate the bytecode + * (the bytecode is generated by visiting the IR). + */ + if (generate_bytecode) { + generate_ir = 1; + } + ctx = filter_parser_ctx_alloc(stdin); if (!ctx) { fprintf(stderr, "Error allocating parser\n");