summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.c
diff options
context:
space:
mode:
authorAndreas Zwinkau <zwinkau@kit.edu>2016-01-14 16:39:57 +0100
committerAndreas Zwinkau <zwinkau@kit.edu>2016-01-14 16:39:57 +0100
commite0a7730cfaeba06cc9dd576f24c500bedc276387 (patch)
tree944e71246f581498997300010037dd7e43184ff3 /ir/be/begnuas.c
parent24af6079daa7338ff2427c94580267c4847155b3 (diff)
Revert "refactor: lazy get_type_size_bytes call"
This reverts commit ccc99db0dcaafcd4bf32f378bfe555a6d9a7cdd0.
Diffstat (limited to 'ir/be/begnuas.c')
-rw-r--r--ir/be/begnuas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c
index 1b865ee..6cd6f14 100644
--- a/ir/be/begnuas.c
+++ b/ir/be/begnuas.c
@@ -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;