Fix: filter-grammar-test: add dependencies between steps
[lttng-tools.git] / src / lib / lttng-ctl / filter / filter-grammar-test.c
index 2804053cf29ceae93cfc3ce0a2a9b0d23a48922a..70656e1a84f42f87b1b0a35bb1579f2b15e908c9 100644 (file)
@@ -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");
This page took 0.023357 seconds and 4 git commands to generate.