diff options
| author | Jimmi Holst Christensen <jimmiholstchristensen@gmail.com> | 2018-06-30 17:35:06 +0200 |
|---|---|---|
| committer | Jimmi Holst Christensen <jimmiholstchristensen@gmail.com> | 2018-06-30 17:35:06 +0200 |
| commit | 01bd5c46e177ae59f72197063c374e845eea3ff3 (patch) | |
| tree | 9829dd206b9062b28994edc6581fda926acfe03c /src/ir.cpp | |
| parent | 616fe798c801baa5fa7238f5fc576a5090938999 (diff) | |
| download | zig-01bd5c46e177ae59f72197063c374e845eea3ff3.tar.gz zig-01bd5c46e177ae59f72197063c374e845eea3ff3.zip | |
Revert "ir_resolve_const now checks recursivly for undef values"
This reverts commit 4c3f27ce1ea17b5236a022971ebace73a02b7c2b.
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
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; |
