diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-06-17 14:40:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-17 14:40:07 -0400 |
| commit | 431fda414189e012252614c7cf3702b46b305e35 (patch) | |
| tree | 929ff496c8b03785eb425329318f5b38170d6962 /src/codegen.cpp | |
| parent | e5956f23ca702b79a3a4b0f0440a2fe88e0231e5 (diff) | |
| parent | 74ccf56a4b1da78b6cd6b0ac34dd6ded1e15b155 (diff) | |
| download | zig-431fda414189e012252614c7cf3702b46b305e35.tar.gz zig-431fda414189e012252614c7cf3702b46b305e35.zip | |
Merge pull request #1123 from ziglang/remove-number-casting-syntax
Remove number casting syntax
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 425cdac024..4108cbbd68 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4722,6 +4722,10 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable, case IrInstructionIdPromiseResultType: case IrInstructionIdAwaitBookkeeping: case IrInstructionIdAddImplicitReturnType: + case IrInstructionIdIntCast: + case IrInstructionIdFloatCast: + case IrInstructionIdIntToFloat: + case IrInstructionIdFloatToInt: zig_unreachable(); case IrInstructionIdReturn: @@ -6310,6 +6314,10 @@ static void define_builtin_fns(CodeGen *g) { create_builtin_fn(g, BuiltinFnIdCmpxchgStrong, "cmpxchgStrong", 6); create_builtin_fn(g, BuiltinFnIdFence, "fence", 1); create_builtin_fn(g, BuiltinFnIdTruncate, "truncate", 2); + create_builtin_fn(g, BuiltinFnIdIntCast, "intCast", 2); + 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, BuiltinFnIdCompileErr, "compileError", 1); create_builtin_fn(g, BuiltinFnIdCompileLog, "compileLog", SIZE_MAX); create_builtin_fn(g, BuiltinFnIdIntType, "IntType", 2); // TODO rename to Int |
