Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
2a1d4038
Commit
2a1d4038
authored
Feb 15, 2016
by
Andreas Seltenreich
Browse files
Enforce IR_LINKAGE_NO_CODEGEN for initializers too.
parent
755fac43
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/typerep.h
View file @
2a1d4038
...
...
@@ -155,9 +155,10 @@ typedef enum ir_linkage {
*/
IR_LINKAGE_HIDDEN_USER
=
1
<<
4
,
/**
* Do not generate code even if the entity has a graph attached. The graph
* is only used for inlining. Otherwise the entity is regarded as a
* declaration of an externally defined entity.
* Do not generate code even if the entity has a graph or
* initialization data attached. The graph/data is only used for
* inlining. Otherwise the entity is regarded as a declaration of
* an externally defined entity.
* This linkage flag can be used to implement C99 "inline" or GNU89
* "extern inline".
*/
...
...
ir/be/begnuas.c
View file @
2a1d4038
...
...
@@ -1543,6 +1543,10 @@ static void be_gas_emit_globals(ir_type *const gt, be_main_env_t const *const ma
{
for
(
size_t
i
=
0
,
n
=
get_compound_n_members
(
gt
);
i
<
n
;
i
++
)
{
ir_entity
*
ent
=
get_compound_member
(
gt
,
i
);
if
(
get_entity_linkage
(
ent
)
&
IR_LINKAGE_NO_CODEGEN
)
continue
;
emit_global
(
main_env
,
ent
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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