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
1eb94d6d
Commit
1eb94d6d
authored
Sep 07, 2015
by
Matthias Braun
Browse files
begnuas: rename entity_is_null -> entity_is_zero_initialized
parent
4e57aaa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/begnuas.c
View file @
1eb94d6d
...
...
@@ -389,7 +389,7 @@ static bool entity_is_string_const(const ir_entity *ent, bool only_suffix_null)
return
initializer_is_string_const
(
init
,
only_suffix_null
);
}
static
bool
entity_is_
null
(
const
ir_entity
*
entity
)
static
bool
entity_is_
zero_initialized
(
ir_entity
const
*
entity
)
{
ir_initializer_t
*
initializer
=
get_entity_initializer
(
entity
);
return
initializer
==
NULL
||
initializer_is_null
(
initializer
);
...
...
@@ -482,7 +482,7 @@ static be_gas_section_t determine_basic_section(const ir_entity *entity)
return
GAS_SECTION_RODATA
;
}
}
if
(
entity_is_
null
(
entity
)
&&
!
is_alias_entity
(
entity
))
if
(
entity_is_
zero_initialized
(
entity
)
&&
!
is_alias_entity
(
entity
))
return
GAS_SECTION_BSS
;
return
GAS_SECTION_DATA
;
...
...
@@ -1454,7 +1454,7 @@ static void emit_global(be_main_env_t const *const main_env,
return
;
}
if
(
entity_is_
null
(
entity
))
{
if
(
entity_is_
zero_initialized
(
entity
))
{
assert
(
size
>
0
);
/* use .space for stuff in the bss segment */
be_emit_irprintf
(
"
\t
.space %u, 0
\n
"
,
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