aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-03-02 21:03:50 -0800
committerGitHub <noreply@github.com>2021-03-02 21:03:50 -0800
commit4b57fb5f23aa6513ceaebe396d1faf215cf0a475 (patch)
treea6060a67d81b1f875e0cfb947fadec9325b37a89 /src/codegen/llvm
parent3ad9cb8b473820ec5ea11d85aa72e8ddc83cfa03 (diff)
parent713f1138222dc40355c34c70d83b0a0805bd46c6 (diff)
downloadzig-4b57fb5f23aa6513ceaebe396d1faf215cf0a475.tar.gz
zig-4b57fb5f23aa6513ceaebe396d1faf215cf0a475.zip
Merge pull request #7741 from FireFox317/optionals-llvm
stage2: add support for optionals in the LLVM backend
Diffstat (limited to 'src/codegen/llvm')
-rw-r--r--src/codegen/llvm/bindings.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index 6474957b1c..ccba3d9973 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -21,9 +21,15 @@ pub const Context = opaque {
pub const voidType = LLVMVoidTypeInContext;
extern fn LLVMVoidTypeInContext(C: *const Context) *const Type;
+ pub const structType = LLVMStructTypeInContext;
+ extern fn LLVMStructTypeInContext(C: *const Context, ElementTypes: [*]*const Type, ElementCount: c_uint, Packed: LLVMBool) *const Type;
+
pub const constString = LLVMConstStringInContext;
extern fn LLVMConstStringInContext(C: *const Context, Str: [*]const u8, Length: c_uint, DontNullTerminate: LLVMBool) *const Value;
+ pub const constStruct = LLVMConstStructInContext;
+ extern fn LLVMConstStructInContext(C: *const Context, ConstantVals: [*]*const Value, Count: c_uint, Packed: LLVMBool) *const Value;
+
pub const createBasicBlock = LLVMCreateBasicBlockInContext;
extern fn LLVMCreateBasicBlockInContext(C: *const Context, Name: [*:0]const u8) *const BasicBlock;
@@ -204,6 +210,9 @@ pub const Builder = opaque {
pub const buildPhi = LLVMBuildPhi;
extern fn LLVMBuildPhi(*const Builder, Ty: *const Type, Name: [*:0]const u8) *const Value;
+
+ pub const buildExtractValue = LLVMBuildExtractValue;
+ extern fn LLVMBuildExtractValue(*const Builder, AggVal: *const Value, Index: c_uint, Name: [*:0]const u8) *const Value;
};
pub const IntPredicate = extern enum {