File tree 1 file changed +6
-3
lines changed
src/cmd/compile/internal/gc
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,8 @@ type state struct {
278
278
279
279
type funcLine struct {
280
280
f * obj.LSym
281
- line src.XPos
281
+ file string
282
+ line uint
282
283
}
283
284
284
285
type ssaLabel struct {
@@ -3455,10 +3456,12 @@ func (s *state) check(cmp *ssa.Value, fn *obj.LSym) {
3455
3456
b .Likely = ssa .BranchLikely
3456
3457
bNext := s .f .NewBlock (ssa .BlockPlain )
3457
3458
line := s .peekPos ()
3458
- bPanic := s .panics [funcLine {fn , line }]
3459
+ pos := Ctxt .PosTable .Pos (line )
3460
+ fl := funcLine {f : fn , file : pos .Filename (), line : pos .Line ()}
3461
+ bPanic := s .panics [fl ]
3459
3462
if bPanic == nil {
3460
3463
bPanic = s .f .NewBlock (ssa .BlockPlain )
3461
- s .panics [funcLine { fn , line } ] = bPanic
3464
+ s .panics [fl ] = bPanic
3462
3465
s .startBlock (bPanic )
3463
3466
// The panic call takes/returns memory to ensure that the right
3464
3467
// memory state is observed if the panic happens.
You can’t perform that action at this time.
0 commit comments