projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed superflous computations, these are done later again.
[cparser]
/
ast2firm.c
diff --git
a/ast2firm.c
b/ast2firm.c
index
394e168
..
f92f870
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-2524,6
+2524,11
@@
static ir_node *create_cast(dbg_info *dbgi, ir_node *value_node,
type_t *from_type, type_t *type)
{
type = skip_typeref(type);
type_t *from_type, type_t *type)
{
type = skip_typeref(type);
+ if (type == type_void) {
+ /* make sure firm type is constructed */
+ (void) get_ir_type(type);
+ return NULL;
+ }
if (!is_type_scalar(type)) {
/* make sure firm type is constructed */
(void) get_ir_type(type);
if (!is_type_scalar(type)) {
/* make sure firm type is constructed */
(void) get_ir_type(type);
@@
-4923,14
+4928,10
@@
static void if_statement_to_firm(if_statement_t *statement)
static void while_statement_to_firm(while_statement_t *statement)
{
static void while_statement_to_firm(while_statement_t *statement)
{
- ir_node *jmp = NULL;
- if (get_cur_block() != NULL) {
- jmp = new_Jmp();
- }
-
/* create the header block */
ir_node *header_block = new_immBlock();
/* create the header block */
ir_node *header_block = new_immBlock();
- if (jmp != NULL) {
+ if (get_cur_block() != NULL) {
+ ir_node *const jmp = new_Jmp();
add_immBlock_pred(header_block, jmp);
}
add_immBlock_pred(header_block, jmp);
}
@@
-4950,7
+4951,7
@@
static void while_statement_to_firm(while_statement_t *statement)
break_label = old_break_label;
if (get_cur_block() != NULL) {
break_label = old_break_label;
if (get_cur_block() != NULL) {
- jmp = new_Jmp();
+
ir_node *const
jmp = new_Jmp();
add_immBlock_pred(header_block, jmp);
}
add_immBlock_pred(header_block, jmp);
}