print_expression(statement->expression);
fputs(":\n", out);
}
+ print_statement(statement->label_statement);
}
static void print_declaration_statement(
}
add_immBlock_pred(block, proj);
mature_immBlock(block);
+
+ statement_to_firm(statement->label_statement);
}
static ir_node *get_label_block(declaration_t *label)
struct case_label_statement_t {
statement_t statement;
expression_t *expression;
+ statement_t *label_statement;
};
struct label_statement_t {
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
#define pclose(file) _pclose(file)
#endif /* _WIN32 */
-static int verbose;
+static int verbose;
+static bool do_dump;
static const ir_settings_if_conv_t *if_conv_info = NULL;
static const backend_params *be_params = NULL;
static void dump(ir_graph *irg, const char *suffix)
{
-#if 0
- dump_ir_block_graph(irg, suffix);
-#else
- (void)irg;
- (void)suffix;
-#endif
+ if(do_dump) {
+ dump_ir_block_graph(irg, suffix);
+ }
}
static void get_output_name(char *buf, size_t buflen, const char *inputname,
mode = PrintAst;
} else if(strcmp(arg, "--print-fluffy") == 0) {
mode = PrintFluffy;
+ } else if(strcmp(arg, "--dump") == 0) {
+ do_dump = true;
} else if(strcmp(arg, "-v") == 0) {
verbose = 1;
} else if(arg[0] == '-' && arg[1] == 'f') {
label->expression = parse_expression();
expect(':');
- label->statement.next = parse_statement();
+ label->label_statement = parse_statement();
return (statement_t*) label;
}
label->statement.source_position = token.source_position;
expect(':');
- label->statement.next = parse_statement();
+ label->label_statement = parse_statement();
return (statement_t*) label;
}