diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-02 21:03:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-02 21:03:50 -0800 |
| commit | 4b57fb5f23aa6513ceaebe396d1faf215cf0a475 (patch) | |
| tree | a6060a67d81b1f875e0cfb947fadec9325b37a89 /src/codegen/llvm/bindings.zig | |
| parent | 3ad9cb8b473820ec5ea11d85aa72e8ddc83cfa03 (diff) | |
| parent | 713f1138222dc40355c34c70d83b0a0805bd46c6 (diff) | |
| download | zig-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/bindings.zig')
| -rw-r--r-- | src/codegen/llvm/bindings.zig | 9 |
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 { |
