introduce std.debug.Trace
And use it to debug a LazySrcLoc in stage2 that is set to a bogus value. The actual fix in this commit is: ```diff - try sema.emitBackwardBranch(&child_block, call_src); + try sema.emitBackwardBranch(block, call_src); ```
This commit is contained in:
@@ -2163,7 +2163,7 @@ pub const DeclGen = struct {
|
||||
fn todo(self: *DeclGen, comptime format: []const u8, args: anytype) Error {
|
||||
@setCold(true);
|
||||
assert(self.err_msg == null);
|
||||
const src_loc = @as(LazySrcLoc, .{ .node_offset = 0 }).toSrcLoc(self.decl);
|
||||
const src_loc = LazySrcLoc.nodeOffset(0).toSrcLoc(self.decl);
|
||||
self.err_msg = try Module.ErrorMsg.create(self.gpa, src_loc, "TODO (LLVM): " ++ format, args);
|
||||
return error.CodegenFail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user