aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-02-02 18:33:13 +0000
committergingerBill <bill@gingerbill.org>2020-02-02 18:33:13 +0000
commitd56807095a2e9a376bcb583a98aa151ecd77120d (patch)
treeebb3680735016def577b4f87b59e6e6ba0d8b0cd /src/ir_print.cpp
parent5dc82c2720524b2c99f3b35c3636e0b0f10dcbb7 (diff)
Implement constant value generation from ExactValue
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index a3f28c59f..ac4d2469a 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -1014,8 +1014,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
} else if (is_type_enumerated_array(type)) {
ast_node(cl, CompoundLit, value.value_compound);
- Type *index_type = type->EnumeratedArray.elem;
- Type *elem_type = type->Array.elem;
+ Type *elem_type = type->EnumeratedArray.elem;
isize elem_count = cl->elems.count;
if (elem_count == 0) {
ir_write_str_lit(f, "zeroinitializer");