aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-18 17:25:29 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-18 17:25:29 -0400
commit1aafbae5be518309b4c2194cdc24e22642514519 (patch)
tree76146de4441517dbb0125364e3423ce3af12a49e /src/codegen.cpp
parent5d705fc6e35e75a604d3dbbb377ab01bf2b2b575 (diff)
downloadzig-1aafbae5be518309b4c2194cdc24e22642514519.tar.gz
zig-1aafbae5be518309b4c2194cdc24e22642514519.zip
remove []u8 casting syntax. add `@bytesToSlice` and `@sliceToBytes`
See #1061
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 585881a9a5..1bc9a17804 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -4728,6 +4728,8 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdFloatToInt:
case IrInstructionIdBoolToInt:
case IrInstructionIdErrSetCast:
+ case IrInstructionIdFromBytes:
+ case IrInstructionIdToBytes:
zig_unreachable();
case IrInstructionIdReturn:
@@ -6358,6 +6360,8 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdAtomicRmw, "atomicRmw", 5);
create_builtin_fn(g, BuiltinFnIdAtomicLoad, "atomicLoad", 3);
create_builtin_fn(g, BuiltinFnIdErrSetCast, "errSetCast", 2);
+ create_builtin_fn(g, BuiltinFnIdToBytes, "sliceToBytes", 1);
+ create_builtin_fn(g, BuiltinFnIdFromBytes, "bytesToSlice", 2);
}
static const char *bool_to_str(bool b) {