From c72927d777cdacb236d06ad20168f5d8c12e5f7b Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 3 May 2009 10:49:30 +0000 Subject: [PATCH] Remove unnecessary special case: sizeof expressions always have their type set, there is no need to look at the expression to determine the type. [r25864] --- ast2firm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ast2firm.c b/ast2firm.c index a1b2c45..a044b3c 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -2922,13 +2922,7 @@ static ir_node *compound_literal_to_firm( */ static ir_node *sizeof_to_firm(const typeprop_expression_t *expression) { - type_t *type = expression->type; - if (type == NULL) { - type = expression->tp_expression->base.type; - assert(type != NULL); - } - - type = skip_typeref(type); + type_t *const type = skip_typeref(expression->type); /* §6.5.3.4:2 if the type is a VLA, evaluate the expression. */ if (is_type_array(type) && type->array.is_vla && expression->tp_expression != NULL) { -- 2.20.1