coverage

package standard library
go1.21.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL