MCPcopy Index your code
hub / github.com/tinygo-org/tinygo / attachDebugInfo

Method attachDebugInfo

compiler/compiler.go:783–787  ·  view source on GitHub ↗

attachDebugInfo adds debug info to a function declaration. It returns the DISubprogram metadata node.

(f *ssa.Function)

Source from the content-addressed store, hash-verified

781// attachDebugInfo adds debug info to a function declaration. It returns the
782// DISubprogram metadata node.
783func (c *compilerContext) attachDebugInfo(f *ssa.Function) llvm.Metadata {
784 pos := c.program.Fset.Position(f.Syntax().Pos())
785 _, fn := c.getFunction(f)
786 return c.attachDebugInfoRaw(f, fn, "", pos.Filename, pos.Line)
787}
788
789// attachDebugInfo adds debug info to a function declaration. It returns the
790// DISubprogram metadata node. This method allows some more control over how

Callers 2

createAliasMethod · 0.80
createFunctionStartMethod · 0.80

Calls 3

getFunctionMethod · 0.95
attachDebugInfoRawMethod · 0.95
PosMethod · 0.65

Tested by

no test coverage detected