diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-08-28 18:25:14 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-08-29 23:43:52 +0100 |
| commit | c62487da76b08a0dfb69fbf76501250ca065c140 (patch) | |
| tree | 1ef46d45f3ff9edaade3805d9ab5a9910cb8571b /src/codegen.zig | |
| parent | ba8d3f69ca65738f27deea43e795f5e787a061f2 (diff) | |
| download | zig-c62487da76b08a0dfb69fbf76501250ca065c140.tar.gz zig-c62487da76b08a0dfb69fbf76501250ca065c140.zip | |
compiler: avoid field/decl name conflicts
Most of the required renames here are net wins for readaibility, I'd
say. The ones in `arch` are a little more verbose, but I think better. I
didn't bother renaming the non-conflicting functions in
`arch/arm/bits.zig` and `arch/aarch64/bits.zig`, since these backends
are pretty bit-rotted anyway AIUI.
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index 67217c37e8..adc77c78ed 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -836,16 +836,6 @@ pub const GenResult = union(enum) { /// Traditionally, this corresponds to emitting a relocation in a relocatable object file. lea_symbol: u32, }; - - fn fail( - gpa: Allocator, - src_loc: Zcu.LazySrcLoc, - comptime format: []const u8, - args: anytype, - ) Allocator.Error!GenResult { - const msg = try ErrorMsg.create(gpa, src_loc, format, args); - return .{ .fail = msg }; - } }; fn genNavRef( @@ -935,7 +925,8 @@ fn genNavRef( const atom = p9.getAtom(atom_index); return .{ .mcv = .{ .memory = atom.getOffsetTableAddress(p9) } }; } else { - return GenResult.fail(gpa, src_loc, "TODO genNavRef for target {}", .{target}); + const msg = try ErrorMsg.create(gpa, src_loc, "TODO genNavRef for target {}", .{target}); + return .{ .fail = msg }; } } |
