From 01bd5c46e177ae59f72197063c374e845eea3ff3 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sat, 30 Jun 2018 17:35:06 +0200 Subject: Revert "ir_resolve_const now checks recursivly for undef values" This reverts commit 4c3f27ce1ea17b5236a022971ebace73a02b7c2b. --- src/ir.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 2cce4a5044..c6078e755d 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -9148,15 +9148,8 @@ enum UndefAllowed { static ConstExprValue *ir_resolve_const(IrAnalyze *ira, IrInstruction *value, UndefAllowed undef_allowed) { switch (value->value.special) { - case ConstValSpecialStatic: { - ConstExprValue *res = &value->value; - if (undef_allowed == UndefBad && contains_comptime_undefined_value(res)) { - ir_add_error(ira, value, buf_sprintf("use of undefined value")); - return nullptr; - } - - return res; - } + case ConstValSpecialStatic: + return &value->value; case ConstValSpecialRuntime: ir_add_error(ira, value, buf_sprintf("unable to evaluate constant expression")); return nullptr; -- cgit v1.2.3