mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
compiler: fix incorrect DWARF type in some generic parameters
For some reason, the type of a function parameter can sometimes be of interface type, while it should be the underlying type. This might be a bug in the x/tools/go/ssa package but this is a simple workaround.
This commit is contained in:
committed by
Ron Evans
parent
c4d99e5297
commit
f6e6aca8d9
@@ -688,7 +688,7 @@ func (b *builder) getLocalVariable(variable *types.Var) llvm.Metadata {
|
||||
Name: param.Name(),
|
||||
File: b.getDIFile(pos.Filename),
|
||||
Line: pos.Line,
|
||||
Type: b.getDIType(variable.Type()),
|
||||
Type: b.getDIType(param.Type()),
|
||||
AlwaysPreserve: true,
|
||||
ArgNo: i + 1,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user