summaryrefslogtreecommitdiffstats
path: root/gcc/cfghooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r--gcc/cfghooks.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index a4cc31c8b61..4d89aea8f5c 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -55,12 +55,19 @@ tree_register_cfg_hooks (void)
cfg_hooks = &tree_cfg_hooks;
}
-/* Returns current ir type (rtl = 0, trees = 1). */
+/* Returns current ir type. */
-int
-ir_type (void)
+enum ir_type
+current_ir_type (void)
{
- return cfg_hooks == &tree_cfg_hooks ? 1 : 0;
+ if (cfg_hooks == &tree_cfg_hooks)
+ return IR_GIMPLE;
+ else if (cfg_hooks == &rtl_cfg_hooks)
+ return IR_RTL_CFGRTL;
+ else if (cfg_hooks == &cfg_layout_rtl_cfg_hooks)
+ return IR_RTL_CFGLAYOUT;
+ else
+ gcc_unreachable ();
}
/* Verify the CFG consistency.
OpenPOWER on IntegriCloud