authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-29 01:05:11-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-29 01:05:11-05:00
log3cba603eae1a1c8b0338f5584041c73d55682c0a
treeeaf747f253634521294e49b0ad5bf175af216771
parent1aef0bef754ddf1943e22740ef045fab7769cde1
signaturelock-open Commit is signed but in an unrecognized format.

fix crash when building docgen


1 files changed, 5 insertions(+), 2 deletions(-)

src/analyze.cpp+5-2
...@@ -6734,8 +6734,6 @@ static bool const_values_equal_array(CodeGen *g, ZigValue *a, ZigValue *b, size_...@@ -6734,8 +6734,6 @@ static bool const_values_equal_array(CodeGen *g, ZigValue *a, ZigValue *b, size_
67346734
6735bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {6735bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {
6736 if (a->type->id != b->type->id) return false;6736 if (a->type->id != b->type->id) return false;
6737 assert(a->special == ConstValSpecialStatic);
6738 assert(b->special == ConstValSpecialStatic);
6739 if (a->type == b->type) {6737 if (a->type == b->type) {
6740 switch (type_has_one_possible_value(g, a->type)) {6738 switch (type_has_one_possible_value(g, a->type)) {
6741 case OnePossibleValueInvalid:6739 case OnePossibleValueInvalid:
...@@ -6746,6 +6744,11 @@ bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {...@@ -6746,6 +6744,11 @@ bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {
6746 return true;6744 return true;
6747 }6745 }
6748 }6746 }
6747 if (a->special == ConstValSpecialUndef || b->special == ConstValSpecialUndef) {
6748 return a->special == b->special;
6749 }
6750 assert(a->special == ConstValSpecialStatic);
6751 assert(b->special == ConstValSpecialStatic);
6749 switch (a->type->id) {6752 switch (a->type->id) {
6750 case ZigTypeIdOpaque:6753 case ZigTypeIdOpaque:
6751 zig_unreachable();6754 zig_unreachable();