ssa: add llvm debug info

This commit is contained in:
Li Jie
2024-09-10 11:04:32 +08:00
parent 4bf5dd15e9
commit 3e5338c902
8 changed files with 595 additions and 3 deletions

View File

@@ -287,6 +287,24 @@ func (b Builder) Times(n Expr, loop func(i Expr)) {
b.blk.last = blks[2].last
}
// -----------------------------------------------------------------------------
func (b Builder) Debug(v Expr, dv DIVar, scope DIScope, pos token.Position) {
b.Pkg.DIBuilder().Debug(v, dv, scope, pos, b.blk)
}
func (b Builder) DebugValue(v Expr, dv DIVar, scope DIScope, pos token.Position) {
b.Pkg.DIBuilder().DebugValue(v, dv, scope, pos, b.blk)
}
func (b Builder) DIVarParam(f Function, pos token.Position, varName string, vt DIType, argNo int) DIVar {
return b.Pkg.DIBuilder().DIVarParam(f, pos, varName, vt, argNo)
}
func (b Builder) DIVarAuto(f Function, pos token.Position, varName string, vt DIType) DIVar {
return b.Pkg.DIBuilder().DIVarAuto(f, pos, varName, vt)
}
// -----------------------------------------------------------------------------
/*
type caseStmt struct {