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
b0f7f0ac
Commit
b0f7f0ac
authored
May 22, 2016
by
Christoph Mallon
Browse files
irmemory: Factorise common code.
parent
d23cf441
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/irmemory.c
View file @
b0f7f0ac
...
...
@@ -899,6 +899,7 @@ static ir_type *clone_type_and_cache(ir_type *tp)
ir_type
*
res
=
pmap_get
(
ir_type
,
mtp_map
,
tp
);
if
(
res
==
NULL
)
{
res
=
clone_type_method
(
tp
);
add_method_additional_properties
(
res
,
mtp_property_private
);
pmap_insert
(
mtp_map
,
tp
,
res
);
}
...
...
@@ -922,7 +923,6 @@ static void update_calls_to_private(ir_node *call, void *env)
if
((
get_entity_additional_properties
(
callee
)
&
mtp_property_private
)
&&
((
get_method_additional_properties
(
ctp
)
&
mtp_property_private
)
==
0
))
{
ctp
=
clone_type_and_cache
(
ctp
);
add_method_additional_properties
(
ctp
,
mtp_property_private
);
/* clear mismatches in variadicity that can happen in obscure C
* programs and break when changing to private calling convention. */
ir_type
*
entity_ctp
=
get_entity_type
(
callee
);
...
...
@@ -953,7 +953,6 @@ void mark_private_methods(void)
if
((
get_method_additional_properties
(
mtp
)
&
mtp_property_private
)
==
0
)
{
/* need a new type */
mtp
=
clone_type_and_cache
(
mtp
);
add_method_additional_properties
(
mtp
,
mtp_property_private
);
set_entity_type
(
ent
,
mtp
);
DB
((
dbgcall
,
LEVEL_2
,
"changed entity type of %+F to %+F
\n
"
,
ent
,
mtp
));
changed
=
true
;
...
...
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