aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-02-08 11:09:18 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-02-08 11:09:18 -0500
commitfee875770cb8c9363219b736f6c03e15cff39b92 (patch)
tree711c93d3667e264ca69391bc55526e7375d654c5 /src/codegen.cpp
parent76239f2089bfb03b24dac0dcad21c9c430ad076d (diff)
downloadzig-fee875770cb8c9363219b736f6c03e15cff39b92.tar.gz
zig-fee875770cb8c9363219b736f6c03e15cff39b92.zip
error set casting building
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index e3f182e17c..69460d723a 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -2081,6 +2081,9 @@ static LLVMValueRef ir_render_cast(CodeGen *g, IrExecutable *executable,
assert(wanted_type->id == TypeTableEntryIdInt);
assert(actual_type->id == TypeTableEntryIdBool);
return LLVMBuildZExt(g->builder, expr_val, wanted_type->type_ref, "");
+ case CastOpErrSet:
+ // TODO runtime safety for error casting
+ return expr_val;
}
zig_unreachable();
}