aboutsummaryrefslogtreecommitdiff
path: root/src/Value.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-26 05:51:34 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-26 13:48:07 +0000
commit2a245e3b78890e5d1b65492e51d9fe509ec35b3c (patch)
tree00e839ff9a0ae4a871d282b4e86fbd9baeab701a /src/Value.zig
parenta61def10c66abc871f92c84d9cef85b6b7752cbf (diff)
downloadzig-2a245e3b78890e5d1b65492e51d9fe509ec35b3c.tar.gz
zig-2a245e3b78890e5d1b65492e51d9fe509ec35b3c.zip
compiler: eliminate TypedValue
The only logic which remained in this file was the Value printing logic. This has been moved into a new `print_value.zig`.
Diffstat (limited to 'src/Value.zig')
-rw-r--r--src/Value.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Value.zig b/src/Value.zig
index 81b8583a84..b1230954ed 100644
--- a/src/Value.zig
+++ b/src/Value.zig
@@ -8,9 +8,9 @@ const Target = std.Target;
const Allocator = std.mem.Allocator;
const Zcu = @import("Module.zig");
const Module = Zcu;
-const TypedValue = @import("TypedValue.zig");
const Sema = @import("Sema.zig");
const InternPool = @import("InternPool.zig");
+const print_value = @import("print_value.zig");
const Value = @This();
ip_index: InternPool.Index,
@@ -39,9 +39,9 @@ pub fn fmtDebug(val: Value) std.fmt.Formatter(dump) {
return .{ .data = val };
}
-pub fn fmtValue(val: Value, ty: Type, mod: *Module) std.fmt.Formatter(TypedValue.format) {
+pub fn fmtValue(val: Value, mod: *Module) std.fmt.Formatter(print_value.format) {
return .{ .data = .{
- .tv = .{ .ty = ty, .val = val },
+ .val = val,
.mod = mod,
} };
}