aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-18 03:07:16 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-18 03:07:16 -0400
commit4210f1f6a0f55fb7c7b287ac691582752340f79d (patch)
tree5627170646c8e6abab85756a1ad318834d0aca12 /src/codegen.cpp
parentd52ef95f77478582e5c479cc2bd0a4ecb5591933 (diff)
downloadzig-4210f1f6a0f55fb7c7b287ac691582752340f79d.tar.gz
zig-4210f1f6a0f55fb7c7b287ac691582752340f79d.zip
remove bool to int syntax. add @boolToInt
add missing docs See #1061
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 4108cbbd68..84335d4e06 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -4726,6 +4726,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdFloatCast:
case IrInstructionIdIntToFloat:
case IrInstructionIdFloatToInt:
+ case IrInstructionIdBoolToInt:
zig_unreachable();
case IrInstructionIdReturn:
@@ -6318,6 +6319,7 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdFloatCast, "floatCast", 2);
create_builtin_fn(g, BuiltinFnIdIntToFloat, "intToFloat", 2);
create_builtin_fn(g, BuiltinFnIdFloatToInt, "floatToInt", 2);
+ create_builtin_fn(g, BuiltinFnIdBoolToInt, "boolToInt", 1);
create_builtin_fn(g, BuiltinFnIdCompileErr, "compileError", 1);
create_builtin_fn(g, BuiltinFnIdCompileLog, "compileLog", SIZE_MAX);
create_builtin_fn(g, BuiltinFnIdIntType, "IntType", 2); // TODO rename to Int