@@ -490,7 +490,6 @@ static unsigned long lookup_mask(const char *name, const struct mask_map *map)
return 0;
}
-inline
static unsigned long handle_suboption_mask(char *arg, const struct mask_map *map)
{
const char *token;
@@ -757,16 +756,18 @@ static char **handle_switch_ftabstop(char *arg, char **next)
return next;
}
+static const struct mask_map dump_ir_options[] = {
+ { "$default", DUMP_IR_LINEARIZE },
+ { "linearize", DUMP_IR_LINEARIZE },
+ { "only", DUMP_IR_ONLY },
+ { },
+};
+
static char **handle_switch_fdump(char *arg, char **next)
{
if (!strncmp(arg, "ir", 2)) {
- fdump_ir = DUMP_IR_LINEARIZE;
- arg += 2;
- if (*arg == '\0')
- fdump_ir = DUMP_IR_LINEARIZE;
- else if (!strcmp(arg, "=only"))
- fdump_ir |= DUMP_IR_ONLY;
- else
+ fdump_ir = handle_suboption_mask(arg+2, dump_ir_options);
+ if (fdump_ir == ~0UL)
goto err;
}
@@ -18,7 +18,7 @@ struct bfu bfu_init_20_23(int a)
/*
* check-name: bitfield initializer mask
- * check-command: test-linearize -fdump-ir=only -Wno-decl $file
+ * check-command: test-linearize -fdump-ir=linearize,only -Wno-decl $file
* check-output-ignore
*
* check-output-contains: and\\..*fffff800\$