aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_bindings.zig
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2020-12-24 16:52:14 +0100
committerTimon Kruiper <timonkruiper@gmail.com>2020-12-28 21:20:49 +0100
commitec3aedffb173845b3fe6f7559e06e1bc3cfde6f7 (patch)
tree8826f40cd08a1cbe945e82bc3f2495a0ed42ad7d /src/llvm_bindings.zig
parent4a32d4f288737a0d67484c1f05817ec468ec41f1 (diff)
downloadzig-ec3aedffb173845b3fe6f7559e06e1bc3cfde6f7.tar.gz
zig-ec3aedffb173845b3fe6f7559e06e1bc3cfde6f7.zip
stage2: add initial implementation of func arguments in LLVM backend
The following works: ``` export fn _start() noreturn { assert(true); exit(); } fn assert(cond: bool) void {} fn exit() noreturn { unreachable; } ```
Diffstat (limited to 'src/llvm_bindings.zig')
-rw-r--r--src/llvm_bindings.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/llvm_bindings.zig b/src/llvm_bindings.zig
index e36d71b312..388acc4ba2 100644
--- a/src/llvm_bindings.zig
+++ b/src/llvm_bindings.zig
@@ -36,6 +36,15 @@ pub const ValueRef = opaque {
pub const TypeRef = opaque {
pub const functionType = LLVMFunctionType;
extern fn LLVMFunctionType(ReturnType: *const TypeRef, ParamTypes: ?[*]*const TypeRef, ParamCount: c_uint, IsVarArg: LLVMBool) *const TypeRef;
+
+ pub const constNull = LLVMConstNull;
+ extern fn LLVMConstNull(Ty: *const TypeRef) *const ValueRef;
+
+ pub const constAllOnes = LLVMConstAllOnes;
+ extern fn LLVMConstAllOnes(Ty: *const TypeRef) *const ValueRef;
+
+ pub const getUndef = LLVMGetUndef;
+ extern fn LLVMGetUndef(Ty: *const TypeRef) *const ValueRef;
};
pub const ModuleRef = opaque {