Remove unnecessary assertion.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 17 Apr 2012 10:28:20 +0000 (12:28 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 17 Apr 2012 10:28:20 +0000 (12:28 +0200)
A subsequent assertion checks more.

ast2firm.c

index 05b553e..f5b010a 100644 (file)
@@ -2997,7 +2997,7 @@ static void init_ir_types(void);
 
 static ir_tarval *fold_constant_to_tarval(const expression_t *expression)
 {
-       assert(is_type_valid(skip_typeref(expression->base.type)));
+       assert(is_constant_expression(expression) == EXPR_CLASS_CONSTANT);
 
        bool constant_folding_old = constant_folding;
        constant_folding = true;
@@ -3008,8 +3008,6 @@ static ir_tarval *fold_constant_to_tarval(const expression_t *expression)
 
        init_ir_types();
 
-       assert(is_constant_expression(expression) == EXPR_CLASS_CONSTANT);
-
        ir_graph *old_current_ir_graph = current_ir_graph;
        current_ir_graph = get_const_code_irg();