ia32: free between type in ia32_finish
authorMatthias Braun <matze@braunis.de>
Thu, 15 Dec 2011 18:38:06 +0000 (19:38 +0100)
committerMatthias Braun <matze@braunis.de>
Mon, 19 Dec 2011 16:34:42 +0000 (17:34 +0100)
ir/be/ia32/bearch_ia32.c
ir/be/ia32/ia32_address_mode.c

index 1b63162..a293d7f 100644 (file)
@@ -253,7 +253,7 @@ static int ia32_get_sp_bias(const ir_node *node)
 static void ia32_build_between_type(void)
 {
 #define IDENT(s) new_id_from_chars(s, sizeof(s)-1)
-       if (! between_type) {
+       if (between_type == NULL) {
                ir_type *old_bp_type   = new_type_primitive(mode_Iu);
                ir_type *ret_addr_type = new_type_primitive(mode_Iu);
 
@@ -1768,6 +1768,10 @@ static void ia32_init(void)
 
 static void ia32_finish(void)
 {
+       if (between_type != NULL) {
+               free_type(between_type);
+               between_type = NULL;
+       }
        ia32_free_opcodes();
 }
 
index 78c9084..faaade4 100644 (file)
@@ -525,7 +525,7 @@ static void mark_non_address_nodes(ir_node *node, void *env)
 
 void ia32_calculate_non_address_mode_nodes(ir_graph *irg)
 {
-       be_lv_t  *lv  = be_assure_liveness(irg);
+       be_lv_t *lv = be_assure_liveness(irg);
 
        non_address_mode_nodes = bitset_malloc(get_irg_last_idx(irg));