summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-12-26 19:41:23 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-12-26 19:41:23 +0100
commit457ba52f6e29cbc2febe58c11b08a59dae5680eb (patch)
tree8a2b436be53d5f593477254fee8ff434df726a80 /ir/ir
parente9ee99937a0b6e519cba4e0530f66b8392c14e67 (diff)
dump: Only try to dump the mode of a type, if it has one.
Method types have no mode anymore.
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irdumptxt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c
index 84b8629..6e8ddaf 100644
--- a/ir/ir/irdumptxt.c
+++ b/ir/ir/irdumptxt.c
@@ -765,8 +765,9 @@ void dump_type_to_file(FILE *const F, const ir_type *const tp)
fprintf(F, " state: %s,\n", get_type_state_name(get_type_state(tp)));
fprintf(F, " size: %2u Bytes,\n", get_type_size(tp));
fprintf(F, " alignment: %2u Bytes,\n", get_type_alignment(tp));
- if (is_atomic_type(tp) || is_Method_type(tp))
- fprintf(F, " mode: %s,\n", get_mode_name(get_type_mode(tp)));
+ ir_mode *const mode = get_type_mode(tp);
+ if (mode)
+ fprintf(F, " mode: %s,\n", get_mode_name(mode));
fprintf(F, "\n\n");
}