Commit fa6aa94c authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Use panic("foo") instead of assert(!"foo").

parent 09ab3a76
......@@ -647,33 +647,30 @@ static void emit_init_expression(be_gas_decl_env_t *env, ir_node *init)
case symconst_addr_ent: {
ir_entity *ent = get_SymConst_entity(init);
be_gas_emit_entity(ent);
break;
return;
}
case symconst_ofs_ent: {
ir_entity *ent = get_SymConst_entity(init);
be_emit_irprintf("%d", get_entity_offset(ent));
break;
return;
}
case symconst_type_size:
be_emit_irprintf("%u", get_type_size_bytes(get_SymConst_type(init)));
break;
return;
case symconst_type_align:
be_emit_irprintf("%u", get_type_alignment_bytes(get_SymConst_type(init)));
break;
return;
case symconst_enum_const: {
ir_tarval *tv = get_enumeration_value(get_SymConst_enum(init));
emit_arith_tarval(tv, bytes);
break;
return;
}
default:
assert(!"emit_atomic_init(): don't know how to init from this SymConst");
}
return;
panic("invalid SymConst kind");
case iro_Add:
if (!mode_is_int(mode) && !mode_is_reference(mode)) {
......
......@@ -206,7 +206,7 @@ static void lower_copyb_node(ir_node *irn)
else if (size >= min_large_size)
lower_large_copyb_node(irn);
else
assert(!"CopyB of invalid size handed to lower_copyb_node");
panic("CopyB of invalid size");
}
/**
......
......@@ -8,6 +8,7 @@
* @brief Lower some High-level constructs, moved from the firmlower.
* @author Boris Boesler, Goetz Lindenmaier, Michael Beck
*/
#include "error.h"
#include "lowering.h"
#include "irmode_t.h"
#include "irnode_t.h"
......@@ -204,7 +205,8 @@ static void lower_symconst(ir_node *symc)
/* run the hooks */
hook_lower(symc);
exchange(symc, newn);
break;
return;
case symconst_type_align:
/* rewrite the SymConst node by a Const node */
irg = get_irn_irg(symc);
......@@ -216,10 +218,12 @@ static void lower_symconst(ir_node *symc)
/* run the hooks */
hook_lower(symc);
exchange(symc, newn);
break;
return;
case symconst_addr_ent:
/* leave */
break;
return;
case symconst_ofs_ent:
/* rewrite the SymConst node by a Const node */
irg = get_irn_irg(symc);
......@@ -231,7 +235,8 @@ static void lower_symconst(ir_node *symc)
/* run the hooks */
hook_lower(symc);
exchange(symc, newn);
break;
return;
case symconst_enum_const:
/* rewrite the SymConst node by a Const node */
irg = get_irn_irg(symc);
......@@ -243,12 +248,9 @@ static void lower_symconst(ir_node *symc)
/* run the hooks */
hook_lower(symc);
exchange(symc, newn);
break;
default:
assert(!"unknown SymConst kind");
break;
return;
}
panic("invalid SymConst kind");
}
/**
......
......@@ -1044,7 +1044,7 @@ static int is_real_follower(const ir_node *irn, int input)
return 0;
break;
default:
assert(!"opcode not implemented yet");
panic("opcode not implemented yet");
break;
}
return 1;
......
......@@ -12,6 +12,7 @@
#include <assert.h>
#include "debug.h"
#include "error.h"
#include "iroptimize.h"
#include "scalar_replace.h"
#include "array_t.h"
......@@ -356,7 +357,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env)
break;
default:
assert(!"unexpected tail recursion variant");
panic("unexpected tail recursion variant");
}
}
}
......
......@@ -388,8 +388,7 @@ static size_t find_mode_index(const ir_mode *mode)
return i;
}
/* should really not happen */
assert(!"Cound not find index of mode in find_mode_index()");
return (size_t)-1;
panic("could not find index of mode");
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment