Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
ccc99db0
Commit
ccc99db0
authored
Jan 14, 2016
by
Andreas Zwinkau
Browse files
refactor: lazy get_type_size_bytes call
parent
493826e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/begnuas.c
View file @
ccc99db0
...
...
@@ -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
size
;
return
get_type_size_bytes
(
type
)
;
/* 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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment