return 0 for number of outputs for nodes without backend info
authorMatthias Braun <matze@braunis.de>
Mon, 7 Sep 2009 14:28:40 +0000 (14:28 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 7 Sep 2009 14:28:40 +0000 (14:28 +0000)
[r26502]

ir/be/bearch.h

index b8f9dcb..a8ce925 100644 (file)
@@ -726,6 +726,9 @@ struct arch_env_t {
 static inline unsigned arch_irn_get_n_outs(const ir_node *node)
 {
        backend_info_t *info = be_get_info(node);
+       if (info->out_infos == NULL)
+               return 0;
+
        return ARR_LEN(info->out_infos);
 }