handle Block_entity like other node attributes
[libfirm] / ir / opt / cfopt.c
index 7ed73c2..49aa772 100644 (file)
@@ -114,7 +114,7 @@ static void collect_nodes(ir_node *n, void *ctx)
                ir_node *block = get_nodes_block(n);
                add_Block_phi(block, n);
        } else if (is_Block(n)) {
-               if (has_Block_entity(n)) {
+               if (get_Block_entity(n) != NULL) {
                        /* block with a jump label attached cannot be removed. */
                        set_Block_removable(n, false);
                }