bespilloc is outdated, unfinished and broken. You can revive it from old svn revision...
[libfirm] / ir / tr / type.c
index a60b96c..558fb31 100644 (file)
 # include "config.h"
 #endif
 
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
 #ifdef HAVE_STRING_H
 # include <string.h>
 #endif
@@ -435,12 +429,14 @@ set_type_state(ir_type *tp, type_state state) {
          Assure that only innermost dimension is dynamic? */
       break;
     case tpo_enumeration:
+#ifndef NDEBUG
       assert(get_type_mode != NULL);
       for (i = get_enumeration_n_enums(tp) - 1; i >= 0; --i) {
         ir_enum_const *ec = get_enumeration_const(tp, i);
         tarval        *tv = get_enumeration_value(ec);
         assert(tv != NULL && tv != tarval_bad);
       }
+#endif
       break;
     default: break;
     } /* switch (tp) */
@@ -2033,6 +2029,7 @@ ir_entity *frame_alloc_area(ir_type *frame_type, int size, int alignment, int at
 
   assert(is_frame_type(frame_type));
   assert(get_type_state(frame_type) == layout_fixed);
+  assert(get_type_alignment_bytes(frame_type) > 0);
 
   if (! a_byte)
     a_byte = new_type_primitive(new_id_from_chars("byte", 4), mode_Bu);