aboutsummaryrefslogtreecommitdiff
path: root/src/link
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-07-20 07:43:40 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-20 07:43:40 -0400
commit2e65244cae7e4365ecf3aa6857b84451272316a1 (patch)
tree2607649bf5c9e27778635c25827680794aa04423 /src/link
parent4f742c4cfc3c3134a0d6ebfdfc354286ae97b2c1 (diff)
downloadzig-2e65244cae7e4365ecf3aa6857b84451272316a1.tar.gz
zig-2e65244cae7e4365ecf3aa6857b84451272316a1.zip
dev: fix llvm backend checks
Diffstat (limited to 'src/link')
-rw-r--r--src/link/Coff.zig3
-rw-r--r--src/link/Elf.zig2
-rw-r--r--src/link/MachO.zig4
-rw-r--r--src/link/NvPtx.zig2
-rw-r--r--src/link/Wasm.zig2
5 files changed, 7 insertions, 6 deletions
diff --git a/src/link/Coff.zig b/src/link/Coff.zig
index 732ceb85a6..96142efca3 100644
--- a/src/link/Coff.zig
+++ b/src/link/Coff.zig
@@ -4,7 +4,7 @@
//! LLD is also the default linker for LLVM.
/// If this is not null, an object file is created by LLVM and emitted to zcu_object_sub_path.
-llvm_object: ?*LlvmObject = null,
+llvm_object: ?LlvmObject.Ptr = null,
base: link.File,
image_base: u64,
@@ -2765,6 +2765,7 @@ const StringTable = @import("StringTable.zig");
const Type = @import("../Type.zig");
const Value = @import("../Value.zig");
const AnalUnit = InternPool.AnalUnit;
+const dev = @import("../dev.zig");
pub const base_tag: link.File.Tag = .coff;
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
index d09fea144c..7b44403c8a 100644
--- a/src/link/Elf.zig
+++ b/src/link/Elf.zig
@@ -30,7 +30,7 @@ entry_name: ?[]const u8,
ptr_width: PtrWidth,
/// If this is not null, an object file is created by LLVM and emitted to zcu_object_sub_path.
-llvm_object: ?*LlvmObject = null,
+llvm_object: ?LlvmObject.Ptr = null,
/// A list of all input files.
/// Index of each input file also encodes the priority or precedence of one input file
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
index b9641ee76c..3e5b18e76f 100644
--- a/src/link/MachO.zig
+++ b/src/link/MachO.zig
@@ -1,7 +1,7 @@
base: link.File,
/// If this is not null, an object file is created by LLVM and emitted to zcu_object_sub_path.
-llvm_object: ?*LlvmObject = null,
+llvm_object: ?LlvmObject.Ptr = null,
/// Debug symbols bundle (or dSym).
d_sym: ?DebugSymbols = null,
@@ -4510,7 +4510,6 @@ const dead_strip = @import("MachO/dead_strip.zig");
const eh_frame = @import("MachO/eh_frame.zig");
const fat = @import("MachO/fat.zig");
const link = @import("../link.zig");
-const llvm_backend = @import("../codegen/llvm.zig");
const load_commands = @import("MachO/load_commands.zig");
const relocatable = @import("MachO/relocatable.zig");
const tapi = @import("tapi.zig");
@@ -4562,6 +4561,7 @@ const UnwindInfo = @import("MachO/UnwindInfo.zig");
const WeakBind = bind.WeakBind;
const ZigGotSection = synthetic.ZigGotSection;
const ZigObject = @import("MachO/ZigObject.zig");
+const dev = @import("../dev.zig");
pub const MachError = error{
/// Not enough permissions held to perform the requested kernel
diff --git a/src/link/NvPtx.zig b/src/link/NvPtx.zig
index 6d6179642d..8caaed05da 100644
--- a/src/link/NvPtx.zig
+++ b/src/link/NvPtx.zig
@@ -23,7 +23,7 @@ const Liveness = @import("../Liveness.zig");
const LlvmObject = @import("../codegen/llvm.zig").Object;
base: link.File,
-llvm_object: *LlvmObject,
+llvm_object: LlvmObject.Ptr,
pub fn createEmpty(
arena: Allocator,
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
index 6239425614..c9651b24bb 100644
--- a/src/link/Wasm.zig
+++ b/src/link/Wasm.zig
@@ -61,7 +61,7 @@ export_table: bool,
/// Output name of the file
name: []const u8,
/// If this is not null, an object file is created by LLVM and linked with LLD afterwards.
-llvm_object: ?*LlvmObject = null,
+llvm_object: ?LlvmObject.Ptr = null,
/// The file index of a `ZigObject`. This will only contain a valid index when a zcu exists,
/// and the chosen backend is the Wasm backend.
zig_object_index: File.Index = .null,