package coverage
import "cmd/compile/internal/coverage"
Index ¶
Functions ¶
func FixupInit ¶
func FixupInit(cnames Names)
FixupInit is the second main entry point for coverage compiler fixup. It adds calls to the pkg init function as appropriate to register coverage-related variables with the runtime.
Types ¶
type Names ¶
type Names struct { MetaVar *ir.Name PkgIdVar *ir.Name InitFn *ir.Func CounterMode coverage.CounterMode CounterGran coverage.CounterGranularity }
Names records state information collected in the first fixup phase so that it can be passed to the second fixup phase.
func FixupVars ¶
func FixupVars() Names
FixupVars is the first of two entry points for coverage compiler fixup. It collects and returns the package ID and meta-data variables being used for this "-cover" build, along with the coverage counter mode and granularity. It also reclassifies selected variables (for example, tagging coverage counter variables with flags so that they can be handled properly downstream).
Source Files ¶
- Version
- v1.21.12
- Published
- Jun 27, 2024
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 8 seconds ago –
Tools for package owners.