Commit e0a7730c authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Revert "refactor: lazy get_type_size_bytes call"

This reverts commit ccc99db0.
parent 24af6079
......@@ -934,13 +934,13 @@ static size_t get_initializer_size(const ir_initializer_t *initializer,
static unsigned long compute_entity_size(ir_entity const *const entity)
ir_type *const type = get_entity_type(entity);
unsigned long size = get_type_size_bytes(type);
if (is_alias_entity(entity))
return get_type_size_bytes(type);
return size;
/* Note that for variable array/compound types we may have to inspect the
* initializer to get the actual size */
ir_initializer_t const *const initializer = get_entity_initializer(entity);
unsigned long size = 0;
if (initializer != NULL)
size = get_initializer_size(initializer, type);
return size;
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