From 101aac92c258af9f25520c36f06b2ce8335d7f9a Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Fri, 15 Apr 2022 23:32:26 +0300 Subject: stage2: fix bugs preventing stage2 from building stage3 with LLVM --- src/codegen/llvm.zig | 2 +- src/codegen/llvm/bindings.zig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/codegen') diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index bb7554d363..364cccf335 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -7220,7 +7220,7 @@ pub const FuncGen = struct { return self.builder.buildInBoundsGEP(base_ptr, &indices, indices.len, ""); } - fn getIntrinsic(self: *FuncGen, name: []const u8, types: []*const llvm.Type) *const llvm.Value { + fn getIntrinsic(self: *FuncGen, name: []const u8, types: []const *const llvm.Type) *const llvm.Value { const id = llvm.lookupIntrinsicID(name.ptr, name.len); assert(id != 0); return self.llvmModule().getIntrinsicDeclaration(id, types.ptr, types.len); diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig index b799d649b0..3863385a06 100644 --- a/src/codegen/llvm/bindings.zig +++ b/src/codegen/llvm/bindings.zig @@ -60,7 +60,7 @@ pub const Context = opaque { Packed: Bool, ) *const Type; - const structCreateNamed = LLVMStructCreateNamed; + pub const structCreateNamed = LLVMStructCreateNamed; extern fn LLVMStructCreateNamed(C: *const Context, Name: [*:0]const u8) *const Type; pub const constString = LLVMConstStringInContext; @@ -320,7 +320,7 @@ pub const Module = opaque { extern fn LLVMGetNamedFunction(*const Module, Name: [*:0]const u8) ?*const Value; pub const getIntrinsicDeclaration = LLVMGetIntrinsicDeclaration; - extern fn LLVMGetIntrinsicDeclaration(Mod: *const Module, ID: c_uint, ParamTypes: ?[*]*const Type, ParamCount: usize) *const Value; + extern fn LLVMGetIntrinsicDeclaration(Mod: *const Module, ID: c_uint, ParamTypes: ?[*]const *const Type, ParamCount: usize) *const Value; pub const printToString = LLVMPrintModuleToString; extern fn LLVMPrintModuleToString(*const Module) [*:0]const u8; -- cgit v1.2.3