aboutsummaryrefslogtreecommitdiff
path: root/src/link/Elf/file.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2023-10-31 07:51:26 +0100
committerGitHub <noreply@github.com>2023-10-31 07:51:26 +0100
commita09ba455c2b8334f790fc3ebca9a12c8bd06f1db (patch)
tree837e373b4396939cf850f4606f285cc77ff11d3e /src/link/Elf/file.zig
parent34aac2bae145ae19fcbe36f794ee7054ea4de11f (diff)
parentea95c74948b6cbc615452c661180874213cb5f9c (diff)
downloadzig-a09ba455c2b8334f790fc3ebca9a12c8bd06f1db.tar.gz
zig-a09ba455c2b8334f790fc3ebca9a12c8bd06f1db.zip
Merge pull request #17791 from ziglang/elf-object
elf: rename ZigModule to ZigObject and move all codegen hooks into it
Diffstat (limited to 'src/link/Elf/file.zig')
-rw-r--r--src/link/Elf/file.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/link/Elf/file.zig b/src/link/Elf/file.zig
index f8258bb884..88620e2e5b 100644
--- a/src/link/Elf/file.zig
+++ b/src/link/Elf/file.zig
@@ -1,5 +1,5 @@
pub const File = union(enum) {
- zig_module: *ZigModule,
+ zig_object: *ZigObject,
linker_defined: *LinkerDefined,
object: *Object,
shared_object: *SharedObject,
@@ -23,7 +23,7 @@ pub const File = union(enum) {
_ = unused_fmt_string;
_ = options;
switch (file) {
- .zig_module => |x| try writer.print("{s}", .{x.path}),
+ .zig_object => |x| try writer.print("{s}", .{x.path}),
.linker_defined => try writer.writeAll("(linker defined)"),
.object => |x| try writer.print("{}", .{x.fmtPath()}),
.shared_object => |x| try writer.writeAll(x.path),
@@ -32,7 +32,7 @@ pub const File = union(enum) {
pub fn isAlive(file: File) bool {
return switch (file) {
- .zig_module => true,
+ .zig_object => true,
.linker_defined => true,
inline else => |x| x.alive,
};
@@ -76,7 +76,7 @@ pub const File = union(enum) {
pub fn setAlive(file: File) void {
switch (file) {
- .zig_module, .linker_defined => {},
+ .zig_object, .linker_defined => {},
inline else => |x| x.alive = true,
}
}
@@ -92,7 +92,7 @@ pub const File = union(enum) {
return switch (file) {
.linker_defined => unreachable,
.shared_object => unreachable,
- .zig_module => |x| x.atoms.items,
+ .zig_object => |x| x.atoms.items,
.object => |x| x.atoms.items,
};
}
@@ -115,7 +115,7 @@ pub const File = union(enum) {
pub const Entry = union(enum) {
null: void,
- zig_module: ZigModule,
+ zig_object: ZigObject,
linker_defined: LinkerDefined,
object: Object,
shared_object: SharedObject,
@@ -132,4 +132,4 @@ const LinkerDefined = @import("LinkerDefined.zig");
const Object = @import("Object.zig");
const SharedObject = @import("SharedObject.zig");
const Symbol = @import("Symbol.zig");
-const ZigModule = @import("ZigModule.zig");
+const ZigObject = @import("ZigObject.zig");