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
3cf855d3
Commit
3cf855d3
authored
Mar 06, 2010
by
Michael Beck
Browse files
BugFix: allow method entities to be initialized by an const_initializer.
[r27255]
parent
e6fe1244
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/tr/entity.c
View file @
3cf855d3
...
...
@@ -725,13 +725,17 @@ static void check_entity_initializer(ir_entity *entity)
{
#ifndef NDEBUG
ir_initializer_t
*
initializer
=
entity
->
initializer
;
ir_type
*
entity_tp
=
get_entity_type
(
entity
);
switch
(
initializer
->
kind
)
{
case
IR_INITIALIZER_COMPOUND
:
assert
(
is_compound_
enti
ty
(
entity
));
assert
(
is_compound_ty
pe
(
entity
_tp
));
break
;
case
IR_INITIALIZER_CONST
:
/* methods are initialized by a SymConst */
assert
(
is_atomic_type
(
entity_tp
)
||
is_Method_type
(
entity_tp
));
break
;
case
IR_INITIALIZER_TARVAL
:
assert
(
is_atomic_
enti
ty
(
entity
));
assert
(
is_atomic_ty
pe
(
entity
_tp
));
break
;
case
IR_INITIALIZER_NULL
:
break
;
...
...
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