aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-11-26 04:37:34 -0500
committerAndrew Kelley <superjoe30@gmail.com>2016-11-26 04:37:34 -0500
commit24b65e41ee241c805e0eff8212ef49c5c39e4b8e (patch)
tree21a244d5af04f68a9eb4e88ea7ce025758f6fcab /src/codegen.cpp
parent697c768730ad4c095c376079adbb97854db84cb9 (diff)
downloadzig-24b65e41ee241c805e0eff8212ef49c5c39e4b8e.tar.gz
zig-24b65e41ee241c805e0eff8212ef49c5c39e4b8e.zip
IR: add error for non static const on switch case range
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 434e0a452e..363379ad1b 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -1681,6 +1681,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdCompileVar:
case IrInstructionIdSizeOf:
case IrInstructionIdSwitchTarget:
+ case IrInstructionIdStaticEval:
zig_unreachable();
case IrInstructionIdReturn:
return ir_render_return(g, executable, (IrInstructionReturn *)instruction);
@@ -2968,7 +2969,7 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn_with_arg_count(g, BuiltinFnIdCDefine, "cDefine", 2);
create_builtin_fn_with_arg_count(g, BuiltinFnIdCUndef, "cUndef", 1);
create_builtin_fn_with_arg_count(g, BuiltinFnIdCompileVar, "compileVar", 1);
- create_builtin_fn_with_arg_count(g, BuiltinFnIdConstEval, "constEval", 1);
+ create_builtin_fn_with_arg_count(g, BuiltinFnIdStaticEval, "staticEval", 1);
create_builtin_fn_with_arg_count(g, BuiltinFnIdCtz, "ctz", 1);
create_builtin_fn_with_arg_count(g, BuiltinFnIdClz, "clz", 1);
create_builtin_fn_with_arg_count(g, BuiltinFnIdImport, "import", 1);