remove error set casting syntax. add @errSetCast

See #1061
This commit is contained in:
Andrew Kelley
2018-06-18 15:01:42 -04:00
parent 1ca90b5856
commit 5d705fc6e3
6 changed files with 109 additions and 16 deletions

View File

@@ -4727,6 +4727,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdIntToFloat:
case IrInstructionIdFloatToInt:
case IrInstructionIdBoolToInt:
case IrInstructionIdErrSetCast:
zig_unreachable();
case IrInstructionIdReturn:
@@ -6356,6 +6357,7 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdErrorReturnTrace, "errorReturnTrace", 0);
create_builtin_fn(g, BuiltinFnIdAtomicRmw, "atomicRmw", 5);
create_builtin_fn(g, BuiltinFnIdAtomicLoad, "atomicLoad", 3);
create_builtin_fn(g, BuiltinFnIdErrSetCast, "errSetCast", 2);
}
static const char *bool_to_str(bool b) {