ssa: fix function and global var debug info scope

This commit is contained in:
Li Jie
2024-09-20 12:22:08 +08:00
parent d89b68a279
commit f71e34fd9f
6 changed files with 38 additions and 10 deletions

View File

@@ -339,7 +339,7 @@ func (p Function) scopeMeta(b diBuilder, pos token.Position) DIScopeMeta {
})
p.diFunc = &aDIFunction{
b.di.CreateFunction(
p.Pkg.cu.ll,
b.file(pos.Filename).ll,
llvm.DIFunction{
Type: diFuncType,
Name: p.Name(),