mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
Builder: fix debug location of the first instruction in a block
This commit is contained in:
parent
dbfa3238fe
commit
c894df54f7
@ -6481,7 +6481,9 @@ pub const WipFunction = struct {
|
||||
self.instructions.appendAssumeCapacity(instruction);
|
||||
if (!self.builder.strip) {
|
||||
self.names.appendAssumeCapacity(final_name);
|
||||
if (!std.meta.eql(self.current_debug_location, self.last_debug_location)) {
|
||||
if (block_instructions.items.len == 0 or
|
||||
self.current_debug_location != self.last_debug_location)
|
||||
{
|
||||
self.debug_locations.putAssumeCapacity(index, self.current_debug_location);
|
||||
self.last_debug_location = self.current_debug_location;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user