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
272f56d6
Commit
272f56d6
authored
Nov 13, 2005
by
Michael Beck
Browse files
handle Const nodes where the tarval is set to NULL (seems to happen in
jack) [r6905]
parent
dc667d91
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irprintf.c
View file @
272f56d6
...
...
@@ -273,7 +273,7 @@ static void firm_emit(char *buf, int buflen, char conversion,
int
i
,
n
;
ir_node
*
block
;
char
add
[
64
];
char
tv
[
256
];
char
tv
_buf
[
256
];
entity
*
ent
;
buf
[
0
]
=
'\0'
;
...
...
@@ -297,7 +297,10 @@ static void firm_emit(char *buf, int buflen, char conversion,
snprintf
(
add
,
sizeof
(
add
),
"[%ld]"
,
get_type_nr
(
X
));
break
;
case
k_ir_graph
:
snprintf
(
buf
,
buflen
,
"%s%s"
,
A
(
"irg"
),
get_entity_name
(
get_irg_entity
(
X
)));
if
(
X
==
get_const_code_irg
())
snprintf
(
buf
,
buflen
,
"const_code_irg "
);
else
snprintf
(
buf
,
buflen
,
"%s%s"
,
A
(
"irg"
),
get_entity_name
(
get_irg_entity
(
X
)));
snprintf
(
add
,
sizeof
(
add
),
"[%ld]"
,
get_irg_graph_nr
(
X
));
break
;
case
k_ir_node
:
...
...
@@ -313,9 +316,12 @@ static void firm_emit(char *buf, int buflen, char conversion,
break
;
default:
if
(
is_Const
(
X
))
{
tarval_snprintf
(
tv
,
sizeof
(
tv
),
get_Const_tarval
(
X
));
tarval
*
tv
=
get_Const_tarval
(
X
);
if
(
tv
)
tarval_snprintf
(
tv_buf
,
sizeof
(
tv_buf
),
tv
);
snprintf
(
buf
,
buflen
,
"%s%s%s<%s>"
,
A
(
"irn"
),
get_irn_opname
(
X
),
get_mode_name
(
get_irn_mode
(
X
)),
tv
);
get_mode_name
(
get_irn_mode
(
X
)),
tv
?
tv_buf
:
">NULL<"
);
}
else
snprintf
(
buf
,
buflen
,
"%s%s%s"
,
A
(
"irn"
),
get_irn_opname
(
X
),
...
...
@@ -327,8 +333,8 @@ static void firm_emit(char *buf, int buflen, char conversion,
snprintf
(
buf
,
buflen
,
"%s%s"
,
A
(
"mode"
),
get_mode_name
(
X
));
break
;
case
k_tarval
:
tarval_snprintf
(
tv
,
sizeof
(
tv
),
X
);
snprintf
(
buf
,
buflen
,
"%s%s"
,
A
(
"tv"
),
tv
);
tarval_snprintf
(
tv
_buf
,
sizeof
(
tv
_buf
),
X
);
snprintf
(
buf
,
buflen
,
"%s%s"
,
A
(
"tv"
),
tv
_buf
);
break
;
case
k_ir_loop
:
snprintf
(
buf
,
buflen
,
"ldepth[%d]"
,
get_loop_depth
(
X
));
...
...
Write
Preview
Supports
Markdown
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